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 trialDevin Auspland
699 PointsCode Challenge code not working.
Step one was to set the width of the gallery list items inside a media query and that worked. Now its asking to clear the 4th item in the list using clear left. I keep getting "Bummer! Did you use "clear: left;"
Here is my code, which is inside the media query at the bottom of the css:
#gallery li:nth-child(4) {
clear: left;
}
2 Answers
Konrad Pilch
2,435 PointsPress edit and wrap your code with
```css
code here
```
SO we can read and see the code. If you cant do it, let me know i do it and you check it on how i did it.
Devin Auspland
699 PointsDone, and sorry, new to the forums. Loving the fast responses and positive energy though.
Konrad Pilch
2,435 PointsI know :) i jsut want people to learn how to format the code correctly so it saves in time in the future because sometimes a mod wont see it and you could be stuck for few hours because no on can see the code.
Devin Auspland
699 PointsDevin Auspland
699 PointsThat worked but this may want to be changed as it still works without the n in practice and in the video and explanation that is never mentioned.
Thank you for your help and it worked!!
Steven Parker
231,236 PointsSteven Parker
231,236 PointsIt might look like it works the same, but li:nth-child(4) would select the 4th list item. Yet what the challenge asks is to select every 4th list item, so that's li:nth-child(4n).