February 2006
Intermediate to advanced
826 pages
63h 42m
English
The adjacent sibling selector is used
to target an element that comes immediately after another element with
the same parent element. The combinator for adjacent sibling
selectors is a plus (+) sign.
For example, if you wanted to give special presentation treatment to the
first paragraph following a first-level heading, the resulting rule
would look like this:
H1 + p {padding-left: 40;}Browser alert: Child selectors and adjacent sibling selectors are not supported by Netscape 4 or Internet Explorer Version 6 and earlier. Support in Internet Explorer 7, in beta as of this writing, is not yet documented.