Tell IE8 to render in IE7 Mode

{ Posted By : Eric Cobb on April 23, 2009 }
16999 Views
Related Categories: General

I'm sure this has already made its rounds, but I'm putting it here mainly so I'll have a record of it when I can't remember it again.

If your sites do not render correctly in Internet Explorer 8, you can use meta tags to tell Internet Explorer 8 to always render a site or page like Internet Explorer 7.

There are two options for doing this:

  1. On a per-site basis
    You can add the HTTP header:
    <m eta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
  2. On a per-page basis
    You can add a special HTML tag to each document, right after the tag:
    <m eta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

For more details, see the Microsoft Documentation

*As Dan points out below, my blog filters won't let me display a "meta" tag, so I changed the name to "m eta" in the tags above. If you decide to copy and paste the above code, be sure to remove the extra space.

Comments
Dan G. Switzer, II's Gravatar You may want to check your blog filters. The "invalidTag" should actually be "meta". :)
# Posted By Dan G. Switzer, II | 4/23/09 6:04 PM
Eric Cobb's Gravatar Thanks Dan! I've fixed it...well, I fixed it as best I could without editing any blog code. ;-)
# Posted By Eric Cobb | 4/23/09 11:24 PM
Sean's Gravatar Why can't you just you ampersand less than?
# Posted By Sean | 11/4/11 10:45 AM