For the sake of brevity, I will limit the scope of my question to IE6 and up.
Given a test DIV with width:500px; and padding:0 50px;, for example. I would expected to to take up 500px in IE and 600px in compliant browsers and thus require odd hacks or conditional statements to render consistently cross-browser.
Probably everyone on this forum knows that IE supposedly interprets the box model incorrectly, so on occasions when block elements are given explicit dimensions AND padding the rendered size will be different for IE than for complainant browsers. I reading about this, I found an article saying this was only true of IE in quirks mode, which is triggered by transitional or incomplete doctypes.
so my questions are:
- Does this mean if I use the following strict doctype, for example :
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
that I wont have to set different widths for IE and compliant browsers??
-
Since this seem rather a simple but not particularly wide spread way of avoiding a lot of measurement hassles. Does IE do something different in standards mode (or something one should be aware of) that makes this an impractical fix for box model differences?
-
Since I KNOW IE will be touchy about what sends it into quirks mode… does anyone know of a resource/chart that lists what doctype declarations send IE into quirks for versions 6 and up. ( I found one for IE4-6, but of course that’s essentially obsolete)
-
One more curious Q. What effect would a HTML5 doctype have on an IE browser that was created before HTML5…