Question

  Asked: May 27 2008   1:55 PM GMT
  Asked by: LoganGoesPlaces


Border differences in IE and Firefox


CSS, Border property

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.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



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
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development.

Looking for relevant Development Whitepapers? Visit the SearchWinDevelopment.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

LoganGoesPlaces  |   May 27 2008  2:37PM GMT

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.

 

BrentSheets  |   May 27 2008  2:54PM GMT

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.

 

BrentSheets  |   May 27 2008  2:59PM GMT

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.

 

LoganGoesPlaces  |   May 29 2008  2:23PM GMT

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.