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
Garrett Whisenant
Courses Plus Student 3,337 PointsCreate a new rule that selects the first 4 list items only. Set the font weight to bold. Structural Psuedo-classes ?
Create a new rule that selects the first 4 list items only. Set the font weight to bold. right now I have
li:nth-child(-n 4) {
font-weight:bold;
}
would that do it? if not I will take hints ^_^
1 Answer
James Barnett
39,199 PointsHere's a hint, you forgot the plus sign, so it's not a valid CSS selector.
You might find this explanation of nth-child helpful.
Also if you ever want double check your nth-child selector, check out this nth-child calculator
Garrett Whisenant
Courses Plus Student 3,337 PointsGarrett Whisenant
Courses Plus Student 3,337 PointsAwesome! ^_^