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 trialMichael Barnette
614 PointsPadding top , bottom, left , right?
Select the links inside the nav element and set their font weight to 800. Then, set padding on the top and bottom to 15 pixels. Set the padding on the left and right to 10 pixels.
Bummer! The top padding for nav links should be 15px
Where am I messing up?
nav { font-weight: 800; padding: 15px 10px; }
3 Answers
Kevin Kenger
32,834 PointsHey Michael,
The challenge wants you to select the links inside the nav element. So your selector should be nav a
, not just nav
.
Michael Barnette
614 PointsI thought nav li = nav list
Kevin Kenger
32,834 PointsYou're totally right, that's my bad. I changed it.
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsYou are selecting the nav and not the links inside it. Maybe you could try
nav a {
// styles
}
Hope this helps!
Michael Barnette
614 PointsMichael Barnette
614 PointsSo nav a which is nav anchors is nav links?
Kevin Kenger
32,834 PointsKevin Kenger
32,834 PointsYeah exactly. For the most part, when you want to target a link, you'll use the anchor tag selector.
Michael Barnette
614 PointsMichael Barnette
614 PointsAwesome. Thank you