Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
2.1.9 [CSS-Level2-2009] Section 5.7, Adjacent sibling selectors
Collapse the table of content
Expand the table of content

2.1.9 [CSS-Level2-2009] Section 5.7, Adjacent sibling selectors


The specification states:

 Adjacent sibling selectors have the following syntax: E1 + E2, where E2 is the 
 subject of the selector. The selector matches if E1 and E2 share the same parent in 
 the document tree and E1 immediately precedes E2, ignoring non-element nodes (such 
 as text nodes and comments).

Quirks Mode (All Versions)

The adjacent sibling selector is not supported; therefore, styling based on this selector is not supported.

IE7 Mode (All Versions)

Comments are not ignored for adjacent sibling selectors.

© 2015 Microsoft