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.

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

Not able to pass challenge 2 of 2

Is there a problem with the "check work" validation at this location? (http://teamtreehouse.com/library/refactor-the-layout) I get the results that are expected when I look in "preview" but I am not getting credit for the answer. The message that I receive is: "Bummer! Did you set "clear: left" on every fourth gallery list item?"

My CSS code:

gallery li:nth-child(4) {




That didn't post well....LOL.

2 Answers

David Eichel
David Eichel
27,744 Points

Nothing is wrong with the validation I just passed it. Reread the question. It says EVERY 4th item not THE 4th item. I don't want to give you the answer but hopefully this will point you in the right direction.

Thank you! The problem is solved!

Sharina V. Jones
Sharina V. Jones
11,459 Points

What David said is correct. As an additional hint, remember the formula :nth-child(an + b). where a represents a cycle size, n is a counter (starts at 0), and b is an offset value.


Thank you! As David mentioned the "EVERY" is the key. The problem is solved.