Thursday, October 8, 2015

CSS: Fixed :nth-child in IE8

/* li:nth-child(1) */
#nav ul li:first-child a {
    border-top: 5px solid red;
}
/* li:nth-child(2) */
#nav ul li:first-child + li a {
    border-top: 5px solid blue;
}
/* li:nth-child(3) */
#nav ul li:first-child + li + li a {
    border-top: 5px solid green;
}​