[CSS] TARGETING IE7 USING CSS

Read Time:26 Second

IE7 is still in beta but with things apparently being layout complete, this hack may stick around until final launch. It’s a variation on the underscore hack.

(This code snippet is from http://snook.ca/archives/html_and_css/targetting_ie7)

Here’s a quick example:

[code]

p{

border:1px solid green; /* works in all */

*border:1px solid red; /* targets IE6 and 7 */

_border:1px solid blue; /* targets IE6 */

}

[/code]

 

Yes, this is invalid CSS and it might get fixed by the time IE7 hits the streets.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.