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

Seems to me like a bug in the css combinations challenge

https://teamtreehouse.com/library/css-selectors/selectors-beyond-the-basics/combinators-challenge

In task 2 of the the above link I am being asked:

It looks like we need to decrease the space between h2 elements and the paragraph that immediately follows. Create a new selector that targets p elements that are adjacent siblings of an h2. Then, set the top margin to .5em.

My answer is:

/* Complete the challenge by writing CSS below */

.main-nav > li {display: inline-block; margin-left: 20px;}

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

3 Answers

I think you're literally just missing a '.' before the 5em, so that it is 0.5em rather than 5em as it is in your code above.

Hope that helps!

Moderator Edited: Moved response from a Comment to an Answer

Indeed, there should have been a 0 there before the dot... Reported to the Treehouse team.

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hey Ben Aharoni,

The 0 is optional. Some developers prefer to add a leading 0 before the period. This can help you clearly distinguish decimal values from non-decimal values.

got the dot and all, still a bummer, how do I gat past this?

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