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

Mark Bradshaw
PLUS
Mark Bradshaw
Courses Plus Student 7,658 Points

I need help with a quiz question.

Here is the question and my answer is below. My answer seems to be wrong. Not sure what I've done wrong. Please help.

Inside the media query, clear the left side of every 4th list item in the gallery. @media screen and (min-width: 480px) {

gallery li: nth-child (4n) {

clear: left;

} }

3 Answers

Ricky Catron
Ricky Catron
13,023 Points

Gallery is an ID you need to use the ID selector.

Mark Bradshaw
Mark Bradshaw
Courses Plus Student 7,658 Points

Thanks!. I had a spacing issue. I had to re watch the lesson.

If gallery is a class selector it should have a dot. if it's an id selector it should have a hash #.

Mark Bradshaw
Mark Bradshaw
Courses Plus Student 7,658 Points

Thanks!. I had a spacing issue. I had to re watch the lesson.

Hi Mark,

You need to remove the spaces you have before and after nth-child

#gallery li:nth-child(4n) {
    clear: left;
}
Mark Bradshaw
Mark Bradshaw
Courses Plus Student 7,658 Points

Thanks! that was the issue. I re watched the lesson last night and realized that was the problem.