Sibling selectors are targeting only adjacent siblings in the forward order, meaning that the previous sibling in the same branch or the one found two or more positions down the line cannot be reached.

The siblings in the selector must share the same parent in order to make this approach work.

Example

CSS sibling selectors example:

 

›› go to examples ››