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
Brady Kish
2,242 PointsNeed help with Question #2 in Descendant Selectors quiz
I can't seem to get the answer to question #2 in the descendant selectors quiz/code challenge in the CSS Basics course. Can anyone help me out with a hint?
3 Answers
Abe Layee
8,378 Pointsok, got you now. For your code, you're missing a dot/period before the main-content and secondly, we use the word p instead of paragrah. Something like this.
.main-content p {font-weight:bold;}
Abe Layee
8,378 PointsCan you please post your code?
Brady Kish
2,242 PointsThe exact question on the quiz is: Next, target the paragraph that is a descendant of the main-content class. Add a font-weight property and set the value to bold.
THe answer I keep getting is: Bummer! Make sure you're targeting the paragraph nested inside '.main-content'.
Here's my code on the CSS stylesheet:
header span { font-size: 26px; }
main-content paragraph { font-weight: bold; }
Abe Layee
8,378 PointsIn order to use any element with a class, you need to add a period/dot before the element itself. Example
<div class="myclass">I am a class element </div>
.myclass {color:red;}//add a period before the element
Brady Kish
2,242 PointsBrady Kish
2,242 PointsThat did it, thanks! I could swear that I had already tried that variation, but I guess not.