IE 6 renders XHTML Transitional in quirks mode November 15, 2007Posted by fofo in CSS, XHTML.
Tags: CSS, XHTML
A friend of mine is creating his own website. he is using xhtml and css.
he is building it from scratch!!! he has a nice editor that adds doctype declarations for him e.t.c
when he sees his site in IE6 he notices that the browser interprets it in the “quirks mode”.
that is strange because in the doctype declaration he has the following
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
with this Doctype the site should be rendered in the “Standards” mode.
the solution to this problem is a simple one.
Doctype is not the first element on the page.
the editor has added this line.
<?xml version=”1.0″ encoding=”utf-8″?>
this indicates the version of xml and the character encoding
for some reason IE6 switches automatically to quirks mode when doctype is not the first element on the page.