jump to navigation

IE 6 renders XHTML Transitional in quirks mode November 15, 2007

Posted by fofo in CSS, XHTML.
Tags: ,
trackback

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.

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: