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 trialDomnick Knowlton
1,904 PointsWill you help me with this code challenge?
Okay, I have already spent about 45 minutes messing with the code, so will you please help? Also, sorry to say but, :nth selectors are not my speciality in CSS. Here is the link.
5 Answers
Sam Page
1,170 PointsFor number 4 do:
li:nth-child(even) {
background-color: black;
color: white;
}
li:nth-child(3) {
background-color: #FF6347;
}
li:nth-child(-n+4) {
font-weight: bold;
}
li:nth-child(n+5) {
font-size: 30px;
}
Sam Page
1,170 PointsTry:
li:nth-child(even) {
background-color: black;
color: white;
}
Noah Henderson
7,663 PointsI am also stuck on this one and unable to pass step two asking me to make the 3rd line background the hex color FF6347. the first line of code passed the challenge but the (nearly identical?) second rule is refusing to go through.
li:nth-child(even) { color:white; background:black; };
li:nth-child(3) { background-color:#FF6347; };
Sam Page
1,170 PointsI re-did the second part and passed with this code:
li:nth-child(even) {
background-color: black;
color: white;
}
li:nth-child(3) {
background-color: #FF6347;
}
Sam Page
1,170 PointsThis is the third part of the challenge:
li:nth-child(even) {
background-color: black;
color: white;
}
li:nth-child(3) {
background-color: #FF6347;
}
li:nth-child(-n+4) {
font-weight: bold;
}
Domnick Knowlton
1,904 PointsWhat about number 4?