Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Steve Davies
10,389 PointsStuck on a Web Design Challenge
Hi, I am stuck with a task, can anyone see what I am doing wrong?
Here is the question:
Challenge task 2 of 2 Inside the media query, clear the left side of every 4th list item in the gallery.
Here is the error message: Bummer! Did you set "clear: left" on every fourth gallery list item?
And here is my code:
@media screen and (min-width: 480px) {
gallery li:nth-child (4n) {
clear:left; }
gallery li {
width:28.3333%; }
}
Can anyone see what I am missing?
4 Answers

Mateusz Marcinkiewicz
2,142 Pointstry without space nth-child(4n)

Chandler Tayek
5,513 PointsYou do not need the n in (4n) you just need the (4).

Chandler Tayek
5,513 PointsNever mind Mateusz Marcinkiewicz works mine is definitely wrong lol, idk how to delete posts :(

Steve Davies
10,389 PointsAwesome Mateusz, yet in workspaces it works with a space! Crazy! :-)

Steve Davies
10,389 PointsThanks Chandler, it also works as you say it dos.

Chandler Tayek
5,513 PointsYea but that will only work for the first 4th item and not any proceeding 4th items.