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

HTML How to Make a Website Responsive Web Design and Testing Refactor the Layout

Brian Patterson
Brian Patterson
19,588 Points

This is the right answer.

Don't know why this is saying it is wrong. #gallery li:nth-child(4th) { clear:left }

Maximiliane Quel
Maximiliane Quel
Courses Plus Student 55,489 Points

first the argument in brackets should be 4n. and you are also missing the closing ; at the end of your property declaration:

@media screen and (min-width: 480px) {
  #gallery li { width: 28.3333%; }

  #gallery li:nth-child(4n) { clear: left; }
}

2 Answers

Brian Patterson
Brian Patterson
19,588 Points

It works for me now. Thanks for the quick reply.

Brian Patterson
Brian Patterson
19,588 Points

Still says it is wrong. It works in the console but not in the challenge.

Maximiliane Quel
Maximiliane Quel
Courses Plus Student 55,489 Points

it seems to work for me when I put it in. can you paste the entire media query statement that you are trying, please?