PDA

View Full Version : IE8 beta2 and CSS/ JavaScript compatibility quick fix



ddadmin
08-29-2008, 05:03 PM
I've gotten quite a few emails lately on how a DHTML script (whether on DD or elsewhere) or CSS code not quite working properly in the new IE8 beta (http://www.microsoft.com/windows/internet-explorer/beta/) 2 browser that was released a few days ago. For example, if you test out CSS Chrome Menu (http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm) in IE8 beta, it currently fails.

We plan on checking all scripts on DD for IE8 once it's officially released (or dangerously close to), when all the dust have settled in terms of changes to the browser's rendering engine. In the meantime, to get pages on your site that don't function properly in IE8 beta, the quickest way is just to add the IE7 mode meta tag to the HEAD of your page:


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

This META tag causes IE8 to utilize IE7's rendering behavior while still mantaining all IE8 features.

TheJoshMan
09-27-2008, 03:58 AM
too bad that can't work in reverse for all of those poor unfortunate IE6 users...

Use a meta tag to make it "render as IE 7"

LOL

jscheuer1
03-02-2009, 04:33 PM
As a corollary to this, in IE 8, should you wish to force it into its IE 8 standards mode, use this meta tag:


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

I'm finding this useful in development because a demo page I recently made up that validates as HTML 4.01 strict will for some unknown reason throw itself into compatibility mode automatically without this meta tag, but only when scrolled! I cannot have the mode changing in mid page, that's just too hard to code for.

Here's a link to the official MS document on this issue:

http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx