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 How to Make a Website Styling Web Pages and Navigation Create a Horizontal List of Links

i am stuck plz help me out ??? i am doing the padding: 15px 10px ; buts its not letting me go futher

Challenge task 4 of 4 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. PreviewRecheck work css/main.css

nav ul { 10 margin: 0px 10px 0px 10px; 11 list-style: none ; 12 padding:0; 13

14

15 } 16

17 nav li{ 18 display:inline-block; 19 font-weight:800; 20 padding: 15px 10px; 21 }

4 Answers

Brett Smith
Brett Smith
4,261 Points

I didn't work all the way through to see what you're asking about the first time. I looks like you're including the font-weight and padding with the list-items (nav li). The question is asking to include the font-weight and padding with the link elements (nav a). Hope this helps!

Andrew McCormick
Andrew McCormick
17,730 Points

make sure you are using the selector for links and not list-items.

I got stuck there too, as Brett posted, you are mixing nav li(for lists) with nav a(for links)!

Just an little error, that got me crazy for some minutes!

Why does nav a refer to a link? And in general, what does "a" reference?

A is the anchor tag for the links