Created
February 23, 2012 10:10
-
-
Save jensgro/1892088 to your computer and use it in GitHub Desktop.
IE-Hacks
This file contains hidden or 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
/* based upon: https://github.com/ginader/CSS-Hacks/ */ | |
/*IE 6 and IE 7 */ | |
.something {*display:block;} | |
/* IE 6 */ | |
body .something { _display: block;} | |
/* IE 6 */ | |
* html .something { display: block;} | |
/* IE 6 */ | |
*+html .something { display: block;} | |
/* IE 7 */ | |
html > body .something {*display:block;} | |
/* IE6, IE 7, IE 8 and IE 9 */ | |
body .something {display:block\9;} | |
/* IE 8 */ | |
body .something {display:block \9; *display: none; /* overwrite for ie6 and ie7*/ } | |
body .something:nth-of-type(1n){ display:none; /* overwrite for ie9 which still also reads the \9 hack */} | |
/* IE 9+ */ | |
/* CSS3 Selector that excludes IE prior to v9 */ | |
body .something:nth-of-type(1n){ display:block \9; /* Hack to target IE 9 so we exclude FF, webkit, etc */ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment