Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

CSS Select

Need some help for CSS Select, not sure how to do this question

Add an adjacent selector to make the text of a paragraph underlined if it follows an h2.

4 Answers

What code do you have so far?

Do you want all the paragraphs that follow an h2 to be underlined? or just one paragraph?

the answer would be :

h2 p { your style }

or, i f you're doing the old css course: h2 + p { your style }

Cheers.

Gonzalo - Those 2 selectors, mean similar but different things the first uses a descendant selector and the 2nd uses an adjacent selector.

It's important to understand the differences between the 2, these 2 tutorials should help:

The instructions that Jason referenced called for using an adjacent selector.