Created
June 11, 2014 11:32
-
-
Save kalinchernev/1f92d0a37edcb53a7e34 to your computer and use it in GitHub Desktop.
Selecting children elements in IE
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
/* equivalent to li:nth-child(1) */ | |
#mainNav ul li:first-child a { | |
background: #1b77af; | |
width: 236px; | |
text-align: center; | |
margin-right: 10px; | |
} | |
/* equivalent to li:nth-child(2) */ | |
#mainNav ul li:first-child + li a { | |
background: #33a0ff; | |
} | |
/* equivalent to li:nth-child(3) */ | |
#mainNav ul li:first-child + li + li a { | |
background: #de7803; | |
} | |
/* equivalent to li:nth-child(4) */ | |
#mainNav ul li:first-child + li + li + li a { | |
background: #d94e4e; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment