View Single Post
Old 07-13-2008, 03:56 PM   #4 (permalink)
maZtah
The Acquainted
 
Join Date: Oct 2007
Posts: 170
Thanks: 18
maZtah is an unknown quantity at this point
Default

An adjacent sibling is an element that follows right after another, as long as they both have the same parent.

Your problem is that the <div> is in the body, so they don't have the same parents. What you're looking for is the first-child pseudo-class.

body > div:first-child { } will select only the first <div> (in the body).
maZtah is offline  
Reply With Quote