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!
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

Ananya Jha
7,058 PointsCode challenge error
Code challenge is showing me an error for "clear the left side of every 4th item in the gallery". My css is as follows
#gallery li:nth-child (4n) {
clear: left;
}

Ananya Jha
7,058 PointsThanks Dave for your help.
2 Answers

Ananya Jha
7,058 PointsThanks Jamie for you reply. I was just adding a space between child and parenthesis. Silly of me to do so.

James Barnett
39,199 PointsIn CSS remember spaces are syntactically significant as they refer to descendant selectors.

Jamie Williams
5,097 Points #gallery li:nth-child(4n) {
clear: left;
}
works. Did you forget to add the id tag before gallery?
Dave McFarland
Treehouse TeacherDave McFarland
Treehouse TeacherThere's no space between
nth-child
and(4n)