Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

adjacent sibling

The adjacent sibling selector will target elements only if they happen to come directly after other specified elements.
Syntax Logicsibling + sibling { property_list }

CSS Code Example

<style> h3 + p { font-family:"Comic Sans MS", cursive; text-decoration:underline; } </style> <h3>Some Stuff</h3> <p>Stuff inside my paragraph...</p> <p>Stuff inside my paragraph...</p> <p>Stuff inside my paragraph...</p> <h3>More Stuff</h3> <p>Stuff inside my paragraph...</p> <p>Stuff inside my paragraph...</p> <p>Stuff inside my paragraph...</p>

CSS

Selectors

universaltypecompoundclassidnotattributedescendantchildadjacent siblinggeneral siblingfirst childlast childonly childfirst of typelast of typeonly of typenth childnth last childnth of typenth last of typeemptyrootfirst linefirst letterbeforeafterlinkvisitedhoveractivefocustargetenableddisabledcheckedlang