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

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

Possible bug? Or i'm crazy!

I can't figure out what would be wrong with this code. Please help.

Stone Preston
Stone Preston
42,016 Points

you 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

James Barnett
James Barnett
39,199 Points

It'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
Stone Preston
42,016 Points

you 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
James Barnett
39,199 Points

Spaces are syntactically significant in CSS selectors, they are the combinator for descendant selector.

i used this code inside the media query.

#gallery li:nth-child (4n) {
    clear: left;
  }