Created
July 31, 2013 13:24
-
-
Save odenijs/6121942 to your computer and use it in GitHub Desktop.
CSS browser targeting
URL: http://css-tricks.com/snippets/css/browser-specific-hacks/
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
/* IE 6 */ | |
* html .yourclass { } | |
/* IE 7 */ | |
*+html .yourclass{ } | |
/* IE 7 and modern browsers */ | |
html>body .yourclass { } | |
/* Modern browsers (not IE 7) */ | |
html>/**/body .yourclass { } | |
/* Opera 9.27 and below */ | |
html:first-child .yourclass { } | |
/* Safari */ | |
html[xmlns*=""] body:last-child .yourclass { } | |
/* Safari 3+, Chrome 1+, Opera 9+, Fx 3.5+ */ | |
body:nth-of-type(1) .yourclass { } | |
/* Safari 3+, Chrome 1+, Opera 9+, Fx 3.5+ */ | |
body:first-of-type .yourclass { } | |
/* Safari 3+, Chrome 1+ */ | |
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
.yourclass { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment