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

Error message with padding

I get the following error message when check the code:

Question: 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

nav ul { margin: 0 10px; text-decoration: none; padding: 0; }

nav li { display: inline-block; font-weight: 800; padding: 15px 10px; }

3 Answers

Alex Heil
Alex Heil
53,547 Points

hi Craig Kempster , you're currently selecting all the list items inside the nav instead of the links.

so the correct line targetting the links would look like this:

nav a {font-weight: 800; padding: 15px 10px;}

hope that helps and have a nice day ;)

Hi Craig,

Question: Select the links inside the nav element.....

nav a { display: inline-block; font-weight: 800; padding: 15px 10px; }

Not nav li :)

makes sense, thanks.. works