views:

479

answers:

3

My team is developing a website with a pretty complicated UI; jQuery, ASP.Net AJAX, etc. Of course I want my site to be compatible with all the modern browsers. Sometimes, in testing or general usage of the site while it is being developed, IE8 tells me that the page doesn't work in standards mode and it is switching to compatibility mode but it never tells me why. Is there some log or report or setting or something in IE8 that I can use to find out what upset IE8 Standards mode? Everything seems to work fine in FF, Chrome, Safari, and IE7 so what is it that IE8 doesn't like and how can I find that out?

A: 

Probably not an actual answer, but FWIW if it's complaining about the page as delivered (e.g., before you manipulate it with the DOM), you should be able to find out what it's complaining about if you pass that same page through the W3C validator. Of course, the validator checks against the validator's interpretation of the standards (which is very good though possibly not perfect) rather than Microsoft's interpretation of standards (no comment), so the two may not always align...

T.J. Crowder
A: 

Check at Quirksmode to see if they know of obvious causes.

DaveE
A: 

The issue has to do with the styles that you are using which IE8 layout engine has trouble interpreting. Unfortunately there is no comprehensive list of style combinations what will trigger this behavior. You have the ability to turn off the automatic recovery on your own machine by going to 'Tools->Internet Options-> Advanced Tab -> Browsing -> and uncheck 'Automatically recovery from layout errors ..."

This is of course only applied to your machine and is of no benefit to your customers if the layout error is triggered. I do not have an answer to your specific issue, but I'd suggest validating your css against the W3C CSS validator: http://jigsaw.w3.org/css-validator/

Any try removing complex styles one at a time until you find the combination that is triggering the error for your site.

mbenny