Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is ie7 always in Quirks mode?

Here is the DOCTYPE and XML declaration that I am using:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

But still IE7 is always going to quirks mode...

Does anyone have any idea as to why?

Thanks in advance!

like image 837
PropSoft Avatar asked Aug 20 '10 00:08

PropSoft


People also ask

What might possibly happen in quirks mode?

Quirks Mode is a mode of operation of web browsers such as Internet Explorer (IE), Firefox, and Opera. Basically, Quirks Mode (also called Compatibility Mode ) means that a relatively modern browser intentionally simulates many bugs in older browsers, especially IE 4 and IE 5.

What is the difference between standard mode and quirks mode?

In quirks mode, layout emulates nonstandard behavior in Navigator 4 and Internet Explorer 5. This is essential in order to support websites that were built before the widespread adoption of web standards. In full standards mode, the behavior is (hopefully) the behavior described by the HTML and CSS specifications.

How do I know if my browser is in quirks mode?

In Firefox and Opera you can determine if your browser is in "quirks mode" by checking page info. Using document. compatMode , will tell you the mode you are in with most browsers.


1 Answers

If you have anything before the DOCTYPE apart from the XML prolog, then you will trigger quirks mode in IE7. This includes white space and comments.

The XML prolog will only trigger quirks mode in IE6.

like image 128
Rupert Madden-Abbott Avatar answered Sep 21 '22 07:09

Rupert Madden-Abbott