SitePoint
Reference
CSS
Selector Reference
Combinators
Adjacent Sibling Selector
CSS Live Demo: Adjacent Sibling Selector
(this page)
See also:
All Live Demos
CSS Live Demo: Adjacent Sibling Selector
Type your
CSS
here:
(any properties allowed except expression, behavior and @import)
h2+p { font-style:italic; color:#f00; }
Type your
HTML
here:
(any tags allowed except script, iframe, frame, object, img and embed)
<h2>Blowin' in the wind</h2> <p>How many roads must a man walk down,</p> <p>Before you call him a man?</p>
Show me!
Your results appear here: