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

Question on challenge task for of 4 (How to Make a Website course). Create a horizontal list of links

I'm unable to set the padding on top and bottom to 15 pixels. Here is the link to the question: https://teamtreehouse.com/library/create-a-horizontal-list-of-links

Here is the request: 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.

Here is the error message: Bummer! The top padding for nav links should be 15px

Here is the code it is rejecting (I was unable to include a screen shot as requested by Treehouse code challenges)

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

Thanks for any help you can provide.

Jim Gravitt 502-588-8482 (work) 502-896-0231 (home) email: jgravitt@hilliard.com

It's asking you to select the links, not the list elements. You need to use:

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

2 Answers

they are asking to select the links not li

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

That did it. Thanks for caring/helping.

Jim Gravitt