Henrik_Nyholm
asked on
How do I make IE6 run in strict/standard mode?
Dear Experts!
I am trying to make IE6 run in standard compliance mode.
My page is XHTML strict:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Anyway, when testing i JavaScript with alert(document.compatMode) it tells me it is running in backCompat mode
What do I do wrong?
Kindly,
I am trying to make IE6 run in standard compliance mode.
My page is XHTML strict:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Anyway, when testing i JavaScript with alert(document.compatMode)
What do I do wrong?
Kindly,
Some other useful links
http://www.dnncreative.com/tabid/231/Default.aspx
http://hsivonen.iki.fi/doctype/
http://www.dnncreative.com/tabid/231/Default.aspx
http://hsivonen.iki.fi/doctype/
herefore, both Microsoft and Mozilla decided to do something about it. The solution was two different rendering modes: The first mode, known as quirk or compatible mode, renders the pages like the old, incompatible browsers used to. The second mode, known as standard or compliant mode, renders them like the pages should be rendered according to W3C recommendations. The technical details about these modes can be found in the browser documentation mentioned below.
The big question now is: How does the browser decide which rendering mode he will use for a particular page? This question could be answered in a number of ways, of course. Both Microsft and Mozilla decided to use the document type declaration (or the lack thereof): If the document type declaration is of type a, then switch into standard mode. If the document type definition is of type b, or if no document type definition is found, then switch into quirk mode.
reference: http://gutfeldt.ch/matthias/articles/doctypeswitch.html
The big question now is: How does the browser decide which rendering mode he will use for a particular page? This question could be answered in a number of ways, of course. Both Microsft and Mozilla decided to use the document type declaration (or the lack thereof): If the document type declaration is of type a, then switch into standard mode. If the document type definition is of type b, or if no document type definition is found, then switch into quirk mode.
reference: http://gutfeldt.ch/matthias/articles/doctypeswitch.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://msdn.microsoft.com/en-us/library/ms535242(v=vs.85).aspx
http://reference.sitepoint.com/css/doctypesniffing
http://www.quirksmode.org/css/quirksmode.html