HTML and CSS Reference
In-Depth Information
Name
Adjacent Sibling Selector
Pattern:
element1 + element2
Description:
This allows the author to select an element that is the following adjacent sibling of another
element. (Sibling elements, as the name implies, share the same parent element.) Any text
between the two elements is ignored; only elements and their positions in the document tree
are considered.
Examples:
table + p {margin-top: 2.5em;}
h1 + * {margin-top: 0;}
Search WWH ::




Custom Search