CSS tricks ul li and table row

First row : green

ul li:first-child {
color:green;
}

Last row : Red

ul li:last-child {
color:red;
}

Alternate row bg color : Gray

ul li:nth-child(2n+2) {
background-color:#ccc;
}

Fifth row : Bold

ul li:nth-child(4) {
font-weight:bold;
}

More here: http://css-tricks.com/5452-how-nth-child-works/

Leave a Reply

Your email address will not be published. Required fields are marked *