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
yarontamuz
1,889 PointsIs there a known bug with the "Refactor The Layout Challenge"?
I can't seem to pass the second task...
1 Answer
Colin Bell
29,679 PointsYou need to use the nth-child pseudo selector. It's asking to clear the left side of every 4th list item - 4th, 8th, 12th, etc. So 4*n* is needed instead of simply 4 (which would only clear left for the 4th item, then never again).
@media screen and (min-width: 480px) {
#gallery li {
width: 28.3333%
}
#gallery li:nth-child(4n){
clear: left;
}
}
yarontamuz
1,889 Pointsyarontamuz
1,889 PointsThanx! I wrote it without the "n"..