Allowing IE8 to render websites like IE7

It is well known all Internet Explorer browsers render content differently, and we used to have different stylesheets for different versions.

With IE8 you can add in a META tag to tell IE8 to render websites like IE7. So this means no need to have yet another stylesheet for IE8, it can use the IE7 stylesheet.

The following code in the HEAD section BEFORE the stylesheets will achieve this:

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

But in Joomla, if you use the recommended way to insert a stylesheet into your template (using $document->addStyleSheet) AND you want your <title> to come first, you cannot easily add this code without hacking core files.

So to achieve this you can insert this line in Joomla index.php using the following code BEFORE your $document->addStyleSheet code.

$this->setMetaData( ‘X-UA-Compatible’, ‘IE=EmulateIE7’, true );