timezhong
timezhong

Reputation: 71

What can we use just target win ie7?

We can target both ie6 & ie7 with the * hack.

Is there a way to target ie7 only, just like you can target ie6 with the underscore hack?

Upvotes: 0

Views: 164

Answers (2)

mreq
mreq

Reputation: 6542

Use conditional stylesheets instead of css hacking.

Example:

<!--[if lte IE 7]>
This is only read by IE7 and lower. Include specific css here.
<![endif]-->

If you insist on using css hacks (which you should not), take a look here

Taken from this source (credits to webdevout.net)

IE 7 only: *:first-child+html {}

Upvotes: 1

Niet the Dark Absol
Niet the Dark Absol

Reputation: 324790

<!--[if ie 7]><link rel="stylesheet" href="styles-for-ie7-only.css" /><![endif]-->

Upvotes: 0

Related Questions