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 Selectors Selectors - Beyond the Basics Combinators Challenge

CSS. Create selector targeting p elements that are direct adjacent siblings of h2 elements. Then set top margin to .5em.

Dear all,

Can't see what is wrong with my code?

.h2 + p { margin-top: .5em; }

Many thanks.

1 Answer

You added a dot before h2(.h2). The dot added makes it look like you have a class called "h2".

Remove that dot and it should work :)

    h2 + p{margin-top: .5em; }

Nice find :D I did the same thing and took ages to figure out what I missed :D