agente_secreto
agente_secreto

Reputation: 8079

How to target IE=EmulateIE7 for IE8 only?

Now that IE9 has come out, I noticed that the IE=EmulateIE7 trick also affects it. How can I make it target IE8 only??

So far I tried conditional comments

<!--[if IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
 <![endif]-->

But for some reason it does not work (maybe conditional comments dont work with meta tags?). Anyone have any idea?

Upvotes: 3

Views: 3547

Answers (2)

meo
meo

Reputation: 31249

Use the dual mode:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=EmulateIE9">

as mentioned here: Emulate IE7 for IE8 but not for IE9 using "X-UA-Compatible"

Upvotes: 3

Dan
Dan

Reputation: 31

I've read that using a semi-colon as the separator doesn't work, and that you should use commas instead, i.e:

content="IE=EmulateIE7, IE=EmulateIE9"

and NOT:

content="IE=EmulateIE7; IE=EmulateIE9"

Upvotes: 3

Related Questions