And so I’ve realized why my site has looked like crap in Internet Explorer for the past year. At some point over a year ago, I added this to the very top of all my template headers:
<!-- <?php echo $_SERVER['REQUEST_URI']; ?> -->
That voids the Doctype of the HTML document, which in turn is interpreted by IE as an excuse to manifest its incorrectly implemented box model, causing widths and heights to be wrongly displayed.
This article explains it in more detail, but mostly the workarounds for versions less than 6. So now you know. The next time paddings and heights are rendered incorrectly in IE, check to see if you have a Doctype at the beginning of your HTML.
Post a Comment