Internet Explorer 8's compatibility flags
Posted May 30th, 2008 in HTML and CSS
Nick MacKechnie at Microsoft blogged about how Internet Explorer 8 is coming and that has a special flag which developers can but into a web page to make it render the page in IE7 mode. There is more info at the MSDN website and their defining document compatibility page.
The tag you insert into the HTML head section to make it render in IE7 mode is as follows:
<meta http-equiv="X-UA-Compatible" content="IE=7" />
Please note that the MSDN document compatibility page appears to contain some errors in the examples. The following examples don't appear to make sense based on the other content in the page, because why would IE=7.5 mean IE7 mode when the other examples in the page tell us to set it to IE=7.
<meta http-equiv="X-UA-Compatible" content="IE=4"> <!-- IE5 mode --> <meta http-equiv="X-UA-Compatible" content="IE=7.5"> <!-- IE7 mode --> <meta http-equiv="X-UA-Compatible" content="IE=100"> <!-- IE8 mode --> <meta http-equiv="X-UA-Compatible" content="IE=a"> <!-- IE5 mode -->
I suspect someone needs to proof the page properly, and it will pay to experiment yourself with the various settings should you wish to use different compatibility modes.
- Using !important with CSS (Saturday, January 31st 2009)
- Internet Explorer 6 min-width hack Part 1 (Saturday, January 24th 2009)
- Fixed footer example using HTML and CSS (Thursday, January 8th 2009)
- Remove cellpadding and cellspacing from an HTML table with CSS (Wednesday, November 5th 2008)
- Targeting specific versions of Internet Explorer and other browsers with conditional comments (Wednesday, June 18th 2008)
- Using Internet Explorer Conditional Tags for Style Sheet Selection (Wednesday, May 21st 2008)