[BNM] IE7 & comment tags before the DTD forcinging to quirks mode

David Andrew david.andrew at gmail.com
Fri Feb 13 11:32:36 GMT 2009


Tip for all the CSS monkeys out there..

Whilst working on a site I was having a major head scratching moment
with IE7 screwing up my CSS. Turns out if you have a comment tag
before the DTD IE7 gets forced into quirks mode e.g.

<code>
<!-- START: include_head.jsp -->
<%@ include file="/WEB-INF/jsp/includes/include_libs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
</code>

Details here http://tinyurl.com/anexm7

D


More information about the BNMlist mailing list. Powered by Wessex Networks