Force IE7 Standards on IE8

Posted on 7th Apr, 2009 in CSS Tips

Following the previous post here are couple of ways emulate and force your browser to go with the IE7 standards while opened with IE8.

First, to do that you’d need to have XHTML Transitional doctype.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">

Then you’d need add the following line above all your meta tags:

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

The solution, is to set the X-UA-Compatible value via an HTTP header ala:

<?php header('X-UA-Compatible: IE=EmulateIE7'); ?>