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
Ray Moreton
2,952 PointsQuestion on CSS padding for four values.
Dear All,
I am stuck on a question and can't see where I am going wrong, the question is this:
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 I put this:
nav { font-weight: 800; padding: 15px 10px 15px 10px; }
It doesn't like it for some reason, I have tried variations but cannot get where I am going wrong.
8 Answers
Jonathan Grieve
Treehouse Moderator 91,254 PointsTry
nav a { font-weight: 800; padding: 15px 10px 15px 10px; }
Kevin Korte
28,149 PointsWhile your answer is technically correct, and would work in the wild, the quiz is looking for a very specific format. It wants the padding set with the two-value shorthand.
Something like padding: top-bottom left-right;
You just gotta fill in the values.
Ray Moreton
2,952 PointsOk thanks for coming back to me so quickly, if I understand you correctly I need to try padding: 15px 10px;
I have tried that also and it doesn't work it just says the top padding for nav links should be 15px
Kevin Korte
28,149 PointsWeird. Can you post the link to the quiz?
Jonathan Grieve
Treehouse Moderator 91,254 PointsIs it possible it's asking for 4 declarations?
padding-bottom: 15px;
padding-top: 15px;
padding-left: 10px;
padding-right;: 10px;
Ray Moreton
2,952 Pointsthat was another thing I tried and it gives the same error.
Ray Moreton
2,952 Pointshttp://teamtreehouse.com/library/create-a-horizontal-list-of-links
Hope this is right
Ray Moreton
2,952 Pointswoohoooo thats the fella so I was missing the a part out wasn't I ???
Jonathan Grieve
Treehouse Moderator 91,254 PointsYup and I should have spotted it earlier. It was looking for a set of links inside a nav element. :)
Ray Moreton
2,952 Pointsthanks very much for your help guys really appreciate it.