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 trialRui Liu
Courses Plus Student 767 PointsCannot pass the code challenge. Please help!
code challenge link is here
"Finally, create a new rule that targets the last 3 list items only. Set the font size to 30px."
li:nth-child(even) {
color:white;
background-color:black;
}
li:nth-child(3) {
background-color: #FF6347;
}
li:nth-child(-n+4) {
font-weight:bold;
}
li:nth-last-child (-n+3) {
font-size: 30px;
}
3 Answers
Richard Duncan
5,568 PointsHi Rui, you have a slight syntax issue caused by a space before the parenthesis (), remove the space. Hope this helps!
Example after the jump: http://jsbin.com/tomutiwoki/1/
Gloria Dwomoh
13,116 PointsCheck this comment I added on this block of your code.
/*Below, you have a space before the parenthesis of the selector
...replace it with li:nth-last-child(-n+3)*/
li:nth-last-child (-n+3) {
font-size: 30px;
}
Rui Liu
Courses Plus Student 767 PointsOh, now I understand. Thanks so much!
Gloria Dwomoh
13,116 PointsYou are welcome Rui :)