Grokking CSS for Web Development
0% completed
Subsequent-sibling combinator (~)
The tilde combinator reaches further than the plus sign, yet it still does not match the paragraph inside the tip box, even though that paragraph appears between the others on the screen.
The subsequent-sibling combinator, a tilde (~), matches every sibling that comes after a given element, whether it follows immediately or several elements later. The selector h2 ~ p reads as "any p element that comes after an h2 with the same parent".
Every Paragraph After the Heading
Replace the style block of the trail page from the first lesson of this chapter with this rule.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%