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 trialMadhvi Maheshwari
7,788 PointsQuestion is asking to write a media query for clear the left item of the gallery list item
@media screen and (min-width: 480px) { #gallery li{ width:28.3333%; } #gallery li:nth-child(4){ clear:left; } }
and i hope i am writing it correctly but its not taking it.
please help
1 Answer
J Donahue
30,790 PointsHere is the answer:
#gallery li:nth-child(4n+4) {
clear: left;
}
Here is a great article explaining why:
Madhvi Maheshwari
7,788 PointsMadhvi Maheshwari
7,788 PointsThanks mate..for replying so early..