Forcing IE7 display in IE8 (updated)

I have been developing for IE8 since it was first released. Although they say it’s a final build, it’s actually in a late beta stage. There are several key CSS commands that haven’t been completed yet (such as :first-letter) and some calculations that still aren’t right in the browser. This is why they built the compatibility mode into it. This creates a major issue for web developers because any conditional statements for IE8 that are put in will break the page once it is fixed. I have thought about every possible fix and the only reasonable solution that I’ve found is… kill it!

Upon scraping the web for possible solutions I came across this gem:

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

Enter this into the head of your page and it forces IE8 into IE7 mode. In case you didn’t know, compatibility mode is a full fledged version of IE7. It even recognizes conditional statements for IE7.

The next step is to have a browser sniff for the exact version that will fix the current IE8 bugs and will only load the meta tag if it’s an older version of IE8. Who knows when Microsoft will get it together enough to fix IE8…I still can’t believe they released a beta version as a final build. I guess nothing coming from them surprises me anymore. Oh well… life goes on (and so does the work)!


I have recently discovered a few things about this that you need to know. First, in Joomla! you must put it above jdoc:include type=”head” to get it to work. Secondly, it actually makes your browser into an IE7 browser with no compatibility mode button. All conditionals are unfortunately kept at IE8 though which creates some issues. You will have to make new conditional statements for IE8, but you can easily tag them onto your old conditionals using if lte IE 8. My solution is to kick IE8 into IE7 mode and just deal with it.


Sign up today to stay informed with industry news & trends