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

matthewroller
matthewroller
2,159 Points

Padding Question

Hello, I am trying to create a padding of top and bottom 15px, and left to right 0px, and when I type in the code.. it gives me an error.. last question of the quiz :\ http://treehouse.offwallattic.com/th-1.JPG

6 Answers

Tom Mertz
Tom Mertz
15,254 Points

Your link didn't send me anywhere.

But first make sure you are selecting the anchor element (a) inside the nav element (nav).

Then make sure you also set the font weight to 800.

Finally, if you need to set a padding where the top and bottom share a value and the left and right share a value you can use the short hand:

padding: (top and bottom value) (left and right value);

For example, if I wanted a top and bottom of 0 and left and right of 5px it would be

padding: 0 5px;

Don't forget your semi colons!

Good luck.

nav a {

font-weight:800;
padding:15px 10px;

}
Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Have you tried using the shorthand for the padding? That might be what the challenge is wanting.

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

}

The question specifies LINKS. Which means you have to target the anchor tag! :)

matthewroller
matthewroller
2,159 Points

I think that's where I messed up, I didn't use short hand.. thanks guys :)

Tom Mertz
Tom Mertz
15,254 Points

No problem man.

Good luck!

matthewroller
matthewroller
2,159 Points

Hey guys, here is a link to my syntax.. it doesn't seem to be working... http://treehouse.offwallattic.com/tech-support.JPG

Matthew, like I said, the questions says you have to select the LINKS. Which means the code should go under the nav a selector which will select the links not nav li.