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

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.