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

Chee Mervin
PLUS
Chee Mervin
Courses Plus Student 4,195 Points

How to add top and bottom padding of 15 pixels and left and right padding of 10 pixels of the link in the nav element?

I typed in

nav li {padding: 15px 10px 15px 10px; }

but I keep getting prompted that the top padding has to be 15pixels. May I know what did I type wrong?

Thanks

1 Answer

Hi Chee,

The challenge appears to be asking for the links inside the nav element (as well as the font weight change) so it should look something like this:

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

Your example is almost there but is actually targeting the list items within the nav instead.

Just to also note, the way you have referenced the padding is correct and fine to use but can be shortened from padding: 15px 10px 15px 10px; to padding: 15px 10px;.

Hope that helps.

-Rich

Chee Mervin
Chee Mervin
Courses Plus Student 4,195 Points

Hi Rich,

Thanks! what you suggested worked. I had previously typed nav lli {}, instead of nav a {}

Regards Mervin

No problem. Glad you got it sorted :)

-Rich