1 2 3 4 5
/* Source: http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/html/tests/css3-modsel-31.html */ .red { background-color : red } p:nth-last-of-type(3) { background-color : lime } dl > :nth-last-of-type(3n+1) { background-color : lime }