IE8 – force your site to display in compatibility mode

If you have just seen your site in IE8 and you feel like crying because all of your hard work has been thrown out of the window, don’t rush into that re-design just yet. You can force IE8 to act like IE7 while you work on a full time fix, by just including this in the header of your pages(s):

<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ />

This will get round some of the new behaviour.

Yes Microsoft we appreciate your efforts in getting your browser to work properly, but we have spent the last 12 years bodging our sites together so that they display properly in your old programs, and your new baby plays by it’s own rules, so now we have to go back over everything….thanks.

Comments

  1. Useful blog

    thanks so much

    i needed this code

  2. Top notch – thanks for this, just what I needed.
    And yes, exactly how I feel when I look at sites that look great in Firefox and then just plain awful in IE8!

  3. One thing to note; it has to be at the top of the ; except for any other elements and the element

  4. ok it’s removes the html…. has to be in [head] at the top except for [meta] and [title] elements

  5. Well, yes, it’s a meta data tag, so of course it goes into head section. IMO it’s also better to use lowercase for all:

  6. meta http-equiv=”x-ua-compatible” content=”ie=emulateie7″

Speak Your Mind

*