How to target all paragraphs within a given DIV next to the first using the nth-child operator.
You can use the formula:
:nth-child(n+1)
or for some browsers (but W3C says " Using the formula (a + b). Description: a represents the size of the loop, n represents the counter (starts at 0), and b represents the offset value. "):
:nth-child(n+2)
Or you can use a separate CSS declaration :first-childfor this first element.
:first-child
using
p:nth-child(n+2) { color: green; }
working demo
Reference
Try
div > p:nth-child(n+2)
Demo at http://jsfiddle.net/Q6FDq/