I have a website. Its one section looks the way i want in IE9
and in IE8
. But when IE9
compatibility mode
is selected the look changes. How can i write a hack for that?
Asked
Active
Viewed 2,083 times
1
-
possible duplicate of [How can I programmaticaly disable IE compatibility mode?](http://stackoverflow.com/questions/3803901/how-can-i-programmaticaly-disable-ie-compatibility-mode) – Jon May 30 '13 at 10:12
-
short answer: don't use compatibility mode. – Spudley May 30 '13 at 10:24
1 Answers
4
Short answer: don't use compatibility mode.
You can force IE not to use compat mode with the following line in the <head>
section of your HTML code:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Hope that helps.

Spudley
- 166,037
- 39
- 233
- 307
-
-
this line should normally stop it going into compatibility mode in the first place. – Spudley May 30 '13 at 11:19
-
-
okay, there are a couple of IE config settings that might be at work here. Firstly, if the page has HTML errors, it might force IE into compat mode. Check with http://validator.w3.org/ to confirm. Secondly if it's running on your local PC, you might be hitting IE's "compat mode on local intranet sites" setting. If so, you should probably switch that setting off. – Spudley May 30 '13 at 11:30