Kathirvel K

CSS Hacks: Use media queries for IE browser

Posted on: February 28, 2014


We can write CSS hacks using media queries also,

/* IE6/7 uses media, */
@media, {
.dude { color: green; }
.gal { color: red; }
}

/* IE8 uses */
@media all {
.dude { color: brown; }
.gal { color: orange; }
}

/* IE9 uses \9 */
@media all and (monochrome:0) {
.dude { color: yellow\9; }
.gal { color: blue\9; }
}

Advertisements
Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: