07-13-2008, 03:56 PM
|
#4 (permalink)
|
|
The Acquainted
Join Date: Oct 2007
Posts: 170
Thanks: 18
|
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).
|
|
|
|