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

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? (https://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) {

clear:left;

}

Suggestions?

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

2 Answers

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.

http://www.w3schools.com/cssref/sel_nth-child.asp

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