why am I triggering quirks mode in IE8?

后端 未结 1 413
误落风尘
误落风尘 2021-01-11 17:15

I\'m working on a page that, when I load into IE8 and view the developers tools it tells me that page default is quirks mode.

I\'ve got a strict DTD:



        
相关标签:
1条回答
  • 2021-01-11 17:31

    Does IE decide on which mode to use at a server level

    Not generally, no. There is the ugliness of the compatibility view list, which is site-specific, but that only kicks you back to IE7-style-Standards Mode, not IE5.5-style-Quirks-Mode.

    Your code otherwise looks OK, as long as that DOCTYPE is the very first thing on the page. IE will be forced to document.compatMode= 'BackCompat' if there is a comment, PI, XML declaration (prior to IE8) or any non-whitespace textual content before the doctype. If a control character has snuck in that you can't see in your text editor, that could do it.

    Example problem page?

    0 讨论(0)
提交回复
热议问题