gomg4q
Last Updated: February 25, 2016
·
411
· murphyrandle

A word on Nth child

Nth child:

.foo:nth-child(n) will not select the nth child of .foo. It'll select the Nth div with a class of foo found in the document. If you want to select the nth child within foo, use the descendant selector like this:

.foo > :nth-child(n)