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

seunghoon lee
seunghoon lee
8,478 Points

Inside the media query, select the list items inside the gallery and add a width of 28.3333%.

I was doing this code challenge and I think my answer is right and this is how the instructor did it as well but it won't accept this answer. What did I do wrong???

@media screen and (min-width: 480px) {

  #gallery li {
    width: 28.3333%;
  }
}

3 Answers

Andrew McCormick
Andrew McCormick
17,730 Points

I would try again. I just copied and pasted the code into the challenge and it passed me no problem. You did use the media query that was at the bottom of the code and not create your own, correct?

seunghoon lee
seunghoon lee
8,478 Points

oh... I was doing it at the top....

thanks!!!

Steven Chin
Steven Chin
2,001 Points

Try this -> '#gallery ul li { width: 28.3333%; }'

seunghoon lee
seunghoon lee
8,478 Points

It doesn't work either :(

I have exactly the same problem- the certain piece of code is not accepted as a correct answer. However, I noticed that within the test workplace, we are asked to write the code under the "css/main.css" file, but the actual piece of code is part of the "css/responsive.css" My guess is that's why the correct code is not accepted.