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
Mark Winter
2,572 Pointswhat am I doing wrong if I want to clear every 4th list item in the element with the if of "gallery"?
gallery li:nth-child(4){
clear: left;
}
4 Answers
Brian Jensen
Treehouse StaffFrom what I can tell you are missing the id declaration # before gallery, and the n (counter) after the 4. The code below should fix it.
#gallery li:nth-child(4n) {
clear:left
}
Mark Winter
2,572 PointsThank you Brian. It is exactly what I had and it is not working:/
Brian Jensen
Treehouse StaffFrom what you pasted it shows:
#gallery li:nth-child(4) { /* No **n** after the 4 */
clear: left;
}
The code I pasted:
#gallery li:nth-child(4n) { /* Is **4n** */
clear:left;
}
Did you add the n later and still not working?
Mark Winter
2,572 PointsOh you are right. Thanks! :)