Trouble setting IE8 browser mode to IE7
Inspite of putting the following meta tag I am not getti开发者_StackOverflow中文版ng the expected result:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
I open the developer tool window. In the same bar where the menu appears there is an item called Browser Mode: it still shows IE 8 by default. Even doing document.documentMode in the console window shows "8". Am I doing anything wrong?
That meta tag MUST be the first thing after the beginning head tag or it wont work... (before all other meta tags etc.)
The developer toolbar does not look at the meta tag when you open it, it is really more for if you want to see how any given web page "will" render if a user is using IE7. The toolbar just defaults to IE8, because that is the version of IE that you are using.
The meta tag tells the browser which mode to use when it's rendering a page that has been requested in the address bar.
精彩评论