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 trialmadhuripatil
1,901 Pointspadding setting to 15px(top and bottom) and 10px(left and right)
I did it as nav li{ padding: 15px 10px; }
Its giving this error- the top padding should be 15px.
pls help.
5 Answers
Jacob Miller
12,466 PointsCode challenge says select the links inside the nav element. So your code should be:
nav a {
font-weight: 800;
padding: 15px 10px;
}
Richard Duncan
5,568 PointsThat's not wrong it could be that the challenge is looking for a specific answer. Try padding: 15px 10px 15px 10px;
madhuripatil
1,901 Pointsyes. when I did nav a, it worked. but links inside nav should be nav li, right? thank you Jacob and Richard for quick reply.
Jacob Miller
12,466 PointsWell, I didn't look at the html, but I'm assuming that there are anchor elements inside of the list items. So no, the links would not be targeded by nav li
. Applying those styles the list items will do pretty much the same thing as applying them to the anchor elements, but nav a
is what the challenge was looking for.
madhuripatil
1,901 PointsYes. There are anchor elements inside. got it. Thanks!