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)
Written by Murphy Randle
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#