Last active
December 29, 2015 03:09
-
-
Save griiettner/7605385 to your computer and use it in GitHub Desktop.
Target IE's using @media
From http://blog.keithclark.co.uk/moving-ie-specific-css-into-media-blocks/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* To target IE 6 and 7 */ | |
@media screen\9 { | |
body { background: red; } | |
} | |
/* To target IE 6, 7 and 8 */ | |
@media \0screen\,screen\9 { | |
body { background: green; } | |
} | |
/* To target IE 8 */ | |
@media \0screen { | |
body { background: blue; } | |
} | |
/* To target IE 8, 9 and 10 */ | |
@media screen\0 { | |
body { background: orange; } | |
} | |
/* To target IE 9 and 10 */ | |
@media screen and (min-width:0\0) { | |
body { background: yellow; } | |
} | |
/* To target IE 10 */ | |
@media all and (-ms-high-contrast: none) { | |
body { background: pink; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment