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 trialChee Mervin
Courses Plus Student 4,195 PointsHow 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
Rich Bagley
25,869 PointsHi 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
Courses Plus Student 4,195 PointsChee Mervin
Courses Plus Student 4,195 PointsHi Rich,
Thanks! what you suggested worked. I had previously typed nav lli {}, instead of nav a {}
Regards Mervin
Rich Bagley
25,869 PointsRich Bagley
25,869 PointsNo problem. Glad you got it sorted :)
-Rich