Border differences in IE and Firefox

45 pts.
Tags:
Border property
CSS
I am trying to put a double border around a content box and I am experiencing problems with how it displays in different browsers. In Firefox it displays on the inside of the box and in IE it displays on the outside. Is there any way to make it display the same way on any browser? Thanks.
ASKED: May 27, 2008  1:55 PM
UPDATED: May 29, 2008  2:23 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hello this is the main difference in how the two browsers handle HTML or stylesheets.
What language are you using? Post an excerpt of the code in the Discussion and I’ll see if this can be solved.

Maybe this is due to the difference in the box model between FF and IE. Or better, between IE and the standard.
I’d try to make the browser display the page in “standars mode”, this might make both browser behave the same.
For this to happen (sorry if I’m being too explicit) you need to add a “DOCTYPE” to the HTML document.
This issue is best explained by P P Koch in http://www.quirksmode.org/css/quirksmode.html

Juan Lanus

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • LoganGoesPlaces
    I am using HTML and an external CSS stylesheet. The content box is just a div with the usual border styles applied to it. The content inside of the content div is generated with PHP. What solution would you recommend? I take it there is no way to just tell it which way to display. If the solution was to create the border manually by positioning divs with borders inside my content box, I would rather not do it and would just settle with it displaying differently.
    45 pointsBadges:
    report
  • BrentSheets
    Developing for Internet Explorer can be frustrating. Are you styling the DIV? You may wish to enclose your PHP content in a paragraph and style that instead of the DIV. That can be a workaround depending on what you're trying to do. Why don't you post your CSS, so we can see it. Thanks.
    6,875 pointsBadges:
    report
  • BrentSheets
    Let me clarify what I said. Try leaving the border styling on your DIV but don't use any padding on the DIV - put your padding on the content inside the DIV to position the same for both FF and IE. Let us know if you work it out. Thanks.
    6,875 pointsBadges:
    report
  • LoganGoesPlaces
    Thanks Brent. I was asked to work on another project until next week, so I won't get a chance to give that a try until then, but I will let you know how it goes.
    45 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following