In IE8, the Microsoft introduced a new mode called compatibility mode which would render the page like IE7.
You can see this button next to address bar in stackoverf
If the "Display intranet sites in Compatibility View" or "Display all websites in Compatibility View" settings (found under Tools -> Compatibility View Settings) are enabled (as they relate to the website being viewed), then no matter what you have in the HTML of the document, the page will always be put in to some form of compatibility view.
This means that, even with in the document, you will still notice that the page is put in to compatibility view, and nothing you can do except disabling those settings will disable it, unfortunately.
I was having an issue with compatibility view, and it turned out some of my PHP files were being saved in UTF-8 character encoding, which I guess was confusing IE. The majority of the site files were saved in Codepage 1252.
Now, I set all the files to save as "Western European (Windows) - Codepage 1252" and my display issues went away.
The lesson here is, don't mix your character encodings.
As per this comprehensive MSDN article on Compatibility View, the following list describes different ways that enable Compatibility View:
To avoid/disable/override Compatibility View, you'll have to do the reverse of the actions suggested above.
The Compatibility View list is an XML file maintained by Microsoft.
To remove your site from the Compatibility View List (or to dispute the removal of your site from the list), have the overall site owner verify that the domain site appears in the Compatibility View List. If it does, send an e-mail to iepo@microsoft.com that contains the following information:
Owner name Corporate title Company name Street address Email address Telephone number Website address
Microsoft will review the provided information and remove your site from the Compatibility View List at the next scheduled update.
Below link was working fine in IE and it was showing menu bar properly http://line25.com/wp-content/uploads/2012/css-menu/demo/index.html
But same content hosted on intranet, all links were displayed one below other instead of menu bar. Compatibility view button was not shown in address bar.
After below change, the menu bar got displayed correctly and compatibility view button got displayed in address bar.
Tools->Compatibility view settings->Uncheck "Display intranet sites in compatibility view"
Thanks a lot for this valuable input
From here:
Sometimes the Compatibility View button isn’t displayed.
The button is located on the address bar next to the ‘stop’ and ‘refresh’ buttons. There are a few cases where there’s no action for a user take and, thus, the Compatibility View button will not show:
If you're viewing an internal-to-Internet Explorer page (such as about:InPrivate)
If you're viewing a page that has declared it's "ready" for Internet Explorer 8 through use of the versioning tag / HTTP header (it doesn’t matter if this tag triggers Quirks, IE7 Standards, or IE8 Standards, the button won’t be displayed)
If you're viewing an intranet page and you have the ‘Display intranet sites in Compatibility View’ checkbox selected If you're viewing any webpage and you have the ‘Display all websites in Compatibility View’ checkbox selected
If you're viewing a webpage that is included on the Microsoft-supplied compatibility view updates list and you have the ‘Include updated website lists from Microsoft’ checkbox selected
If you've toggled either the ‘Document Mode’ or ‘Browser Mode’ settings via the Developer Toolbar
So you're probably after the versioning tag / HTTP header which is described in more details in that blog post and over here.
Short answer:
Put this in your head tag to tell the browser that your page works in IE 8:
<meta http-equiv="X-UA-Compatible" content="IE=8" />
Also as per Jon Hadleys comment, to ensure the latest (not just IE8) rendering engine is used, you could use the following:
<meta http-equiv="X-UA-Compatible" content="IE=edge">