Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Why am I not advancing through this challenge? I believe I have the correct answer.

the question is inside the media query, clear the 4th gallery list items. What is incorrect?

gallery li:nth=child(4n) {

clear: left; }

4 Answers

Joe Bruno
Joe Bruno
35,909 Points

You are close: nth-child not nth=child

Check out the specifications: http://www.w3schools.com/cssref/sel_nth-child.asp

Ricky Catron
Ricky Catron
13,023 Points

Gallery is an ID. Don't forget that ID's need a # before them in order to select the correct thing. Else it looks for a <gallery> tag which doesn't exist. Lastly it should be nth-child not nth=child.

Hi Ricky,

It's likely the only mistake is the =

This comes up a lot in the forums. When the css isn't posted correctly then the # for id's is interpreted as an <h1> using the markdown syntax. That's why we see the selector bold and at a larger font size.

Ricky Catron
Ricky Catron
13,023 Points

OH....whoopsie. Thanks for letting me know!

Yes, thanks. The = was the problem. (You answered while I Googled the solution.)

Logan R
Logan R
22,989 Points

It should be li:nth-child(4n). You need to change that = to a - :)