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 have a problem on challenge

it wants me to set the padding on the top and bottom 15px and the left and right 10 px.

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

this is what i did but it isn't accepted.

4 Answers

Alexander Rasmussen
Alexander Rasmussen
12,901 Points

This worked for me:

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

nav li {
  display: inline-block;
}

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

nav a { padding-top: 15px; padding-bottom: 15px; padding-left: 10px; padding-right: 10px; }

Shawn Flanigan
PLUS
Shawn Flanigan
Courses Plus Student 15,815 Points

Batuhan,

Your code looks good, but they're asking you to target the links inside of the nav element. Here, you're targeting list items within the nav element.

Thank you so much guys! I solved the problem.