An adjacent sibling selector selects a sibling element that comes immediately after a particular element. The combinator of the adjacent sibling selector is the plus sign + . Remember, the element that is first in the (X)HTML document must also appear first in the selector.
Example:
h1 + p {background-color:green;}
Note: The Adjacent Sibling selector is not supported by IE6 (it is ignored).
No comments:
Post a Comment