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

What have I done wrong?

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

5 Answers

Hi Laurie,

I believe you are on the final question, which asks the following:

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.

So, you're actually being asked to select the links rather than the list items.

Jessica Gremillion
Jessica Gremillion
337 Points

is nav a class? then you'll need it to be .nav

Aaron Arkie
Aaron Arkie
5,345 Points

Hello Laurie, are you following along the first tutorial for how to make a website on the Web design track? My code looks like this...

nav li {
  display: inline-block;
}

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

It's almost the same as your's but in two different elements. Is this what you are looking for?

Aaron Arkie
Aaron Arkie
5,345 Points

Here is your code so people can see it better. When you are displaying your code check out the Markdown Cheatsheet above the Post Answer button which is a reference on how to display your code like so. I hope this helps!:)

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

 }
Aaron Arkie
Aaron Arkie
5,345 Points

If Rhys Yorke is correct, try combining my two different elements in a single line of code. I'm not sure if you would still need the display: inline-block bit but try it out, your almost there!:)