Grow your CSS skills. Land your dream job.

Last updated on:

Meta Tag For Forcing IE 8 to Behave Like IE 7

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

Source: Microsoft

Some reports that IE 8 in IE 7 mode doesn't quite behave like either one.

Comments

  1. Permalink to comment#

    It’s bad practice to use this as a ‘set it and forget it’ solution. The plain fact is that they’re *not* the same, and you need to test in both if you’re using this.

  2. Permalink to comment#

    Here is a microsoft Resource that details the differences between IE 8 Compatibility mode and IE7 :
    Site Compatibility and IE8

  3. Permalink to comment#

    I don’t get why anyone would want to change IE8’s pretty decent CSS rendering to a crappy IE7 one..?

  4. Pradeep
    Permalink to comment#

    Yea i agree y do u want to go back to the older versions of IE… ??

  5. Permalink to comment#

    Because otherwise your code has to support “another” browser version that has different behavior.

    Because people write hacks to work around issues in the way older browsers work. Then IE 8 comes along and their hack doesn’t work anymore (because IE 8 does things better now)

    It’s a nice easy method of ensuring that your code works on IE 8 also without modification. It’s easier to add this meta than creating a lot of changes and testing for another browser. Granted that it’s not ideal.

    This was a clever move from MS in my opinion… It will make the transition far easier for developers.

  6. Peter Dubrovski
    Permalink to comment#

    Use for the newest IE

  7. Peter Dubrovski
    Permalink to comment#

    your site has eaten my comment …

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

  8. baber
    Permalink to comment#

    I want to Forcing IE 7 to Behave Like IE 8. is there any way to do it kindly share.

  9. Saurabh Sinha
    Permalink to comment#

    Thats Good to know…but is this also for the IE 10 or the latest version of Internet Explorer??

Leave a Comment

Posting Code

Markdown is supported in the comment area, so you can write inline code in backticks like `this` or multiline blocks of code in in triple backtick fences like ```this```. You don't need to escape code in backticks, Markdown does that for you.

Sadly, it's kind of broken. WordPress only accepts a subset of HTML in comments, which makes sense, because certainly some HTML can't be allowed, like <script> tags. But this stripping happens before the comment is processed by Markdown (via Jetpack). It seems to me that would be reversed, because after Markdown processes code in backticks, it's escaped, thus safe. If you think you can fix this issue, get in touch!

If you need to make sure the code (typically HTML) you post absolutely posts correctly, escape it and put it within <pre><code> tags.

Current ye@r *

*May or may not contain any actual "CSS" or "Tricks".