View Full Version : Wierdness in Win IE

10-17-2004, 10:47 AM
Hello all,

Having a layout issue in Windows IE. The layout I have works perfect on all Mac browsers and on Win Firefox, but it goes haywire in Win IE. I have tired to trouble shoot it and I have found part of the problem, but not sure how to resolve it.

If I remove "margin-left: 30px" from the style sheet, on all the divs that have it, the layout moves more to how it should be, but there are still some formating issues. I have tried looking around for the reason behind this, but haven't found a specific answer.

Do I need to create a style sheet specific to Win IE? Seems like that would defeat the purpose. Anyway, it's late, and I might just be overlooking something, but all advice is appreciated. Thanks a bunch!

- Working Page (http://www.joshmccowen.com/sd)
- Working Style Sheet (http://www.joshmccowen.com/sd/assets/css/screen.css)


10-18-2004, 09:38 AM
I haven't looked in depth at your style sheet, but it reeks of the IE incorrect box model; if I'm not mistaken, serving the content as "xhtml+xml" will even throw IE6.0/win into quirks mode.
It basically boils down to how the width property is interpreted: according to the W3C specs, the total width of a box is the specified width (via the width property) plus all margins, padding and borders; the incorrect IE model takes the specified width as the total width; the remaining content width is calculated by subtracting margins, padding and borders, so the other way around.
When combining a specified width with margins and/or padding and/or borders, the incorrect boc model results in narrower boxes.

This is - briefly - explained by Tantek Celik in "Box Model Hack (http://tantek.com/CSS/Examples/boxmodelhack.html)", including his famous CSS hack to serve IE with a corrected width value.

10-19-2004, 07:24 AM
Thanks for the info! I actually got it working, but I will check out that link you gave for future reference.