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 trialNathan Stewart
5,976 PointsPossible bug? Or i'm crazy!
I can't figure out what would be wrong with this code. Please help.
James Barnett
39,199 PointsIt's hard for us to know what's causing the issue you are having if you don't show us your code. For some tips on how to do that, check out the tips for asking questions video located in the right hand sidebar.
2 Answers
Stone Preston
42,016 Pointsyou have a space after child and before (4n) that is causing the error. you used
#gallery li:nth-child (4n) {
clear: left;
}
but the correct code is
#gallery li:nth-child(4n) {
clear: left;
}
James Barnett
39,199 PointsSpaces are syntactically significant in CSS selectors, they are the combinator for descendant selector.
Nathan Stewart
5,976 Pointsi used this code inside the media query.
#gallery li:nth-child (4n) {
clear: left;
}
Stone Preston
42,016 PointsStone Preston
42,016 Pointsyou are going to need to post the code you are using and format it using markdown. see this post for instructions on code formatting in the forum