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 trialMelissa Stout
750 Pointsnav links
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.
I have tried: nav li { padding:15 10 15 10; front-weight: 800; }
also tried: nav li { padding-top:15px; front-weight: 800; }
The system excepts the front-weight, but wont let me go any further with the padding. Please help me!!!!
2 Answers
Aj Villalobos
1,864 PointsThe instruction was "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."
nav a {
/* Apply "font-weight" not "front-weight" */
font-weight: 800;
/* Apply padding on top and bottom */
padding-top: 15px;
padding-bottom: 15px;
/* Apply padding on left and right */
padding-left: 10px;
padding-right: 10px;
/* Shorthand Version: 1st = Top, 2nd = Right, 3rd = Down, 4th = Left */
padding: 15px 15px 10px 10px;
}
Jason Anello
Courses Plus Student 94,610 PointsHi Melissa,
Your 1st try is the closest.
First, it wants you to select the links inside the nav. That should be nav a
You're trying to select the list items inside the nav.
Second, you don't have the px
unit on your padding numbers.
You also have a typo on font-weight
nav a {
padding:15px 10px 15px 10px;
font-weight: 800;
}
Whenever the top and bottom padding is the same (or margin) and the left and right is the same then you can specify 2 values instead.
padding: 15px 10px;