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 trialBryon Merrill
5,654 PointsNot 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?
2 Answers
David Eichel
28,860 PointsNothing 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.
Bryon Merrill
5,654 PointsThank you! The problem is solved!
Sharina V. Jones
11,459 PointsWhat 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.
Bryon Merrill
5,654 PointsThank you! As David mentioned the "EVERY" is the key. The problem is solved.
Bryon Merrill
5,654 PointsBryon Merrill
5,654 PointsThat didn't post well....LOL.