views:

43

answers:

2

Hi

I just have a quick question about IE8 Standards mode vs Quirks mode.

The page displays fine if you load its first page then log in. I have searched for the doc type which i think is right for changing the page to IE8 Standards Mode and i think it works because IE's built in debugger says it's in that mode. Also if you start on another page which uses quirks mode then navigate to my site the debugger changes modes to IE8 standards.

The problem starts if your change the mode to IE8 standards before you visit the page. e.g say your on google and change the mode in the debugger to IE8 standards then visit the site the page isn't displayed correctly.

I hope i've explained my problem clearly enough. I've posted the doctype i'm using is that is any help.

Thanks in advanced for your help.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
+1  A: 

Add this meta tag to the head

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

This will force IE into the latest standards mode. So if they have IE8 it will be in IE8 even if its set before to other mode.

Also you could start using the html doctype without problem

<!DOCTYPE html>

You can read more about it here:

Geries
Three questions:Did you add the Meta Tag?How does the site looks in the other browsers (chrome, firefox, safari, opera)How do you want the site to render in: quirks or ie standards ?
Geries
A: 

The IE Blog has posted "How IE8 Determines Document Mode" which you should read. Also, note that MS introduced a (... ah! Geries beat me to the punch while typing this!) Take a look at Geries' comment. :)

David Lantner