HTML and CSS Reference
In-Depth Information
Name
General Sibling Selector
Pattern:
element1 ~ element2
Description:
This allows the author to select an element that is a sibling of another element and follows it
in the document tree. Any text or other elements between the two elements are ignored; only
elements and their positions in the document tree are considered.
Examples:
h1 ~ h2 {margin-top: 2.5em;}
div#navlinks ~ div {margin-top: 0;}
Search WWH ::




Custom Search