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

CSS

Code Challenge not accepting correct answer.

http://teamtreehouse.com/library/refactor-the-layout

Task 2 of the Code challenge doesn't accept correct code. I input exactly what I was taught to do during the video as you can see here

Am I in the wrong here?

4 Answers

Matias Valenzuela
Matias Valenzuela
7,554 Points

For the second question:

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

You have to use this inside the media query

Hi Brian,

You want to remove the space that you have after nth-child and before (4n)

Matias Valenzuela
Matias Valenzuela
7,554 Points

Here is how you can pass the challenge:

@media screen and (min-width: 480px) {
  #gallery li {
  width: 28.3333%;
}
}

To select the li has to be nested inside the @media queries.

Quang Nguyen
Quang Nguyen
1,782 Points

Hi there, I have the same problem, I also desperately copy paste the code exactly, but still wrong?!

It says, "Be sure to set the width of gallery list items to 28.3333% when the browser is wider than 480px."

Do you have that media query at the bottom?

check the screenshot posted in the question.

Carlos Herrera
Carlos Herrera
6,383 Points

this challenge does not show for me. i've tried in different browsers. I only see the header. Is this an instance where I should report it as a bug? It has to be temporary because everyone access it in order to earn that badge.

thank you!