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 How to Make a Website Responsive Web Design and Testing Refactor the Layout

Steve Isaacs
Steve Isaacs
2,112 Points

Not passing this Media Query question about the gallery

UGH. Have no idea why this isn't passing.

css

@media screen and (min-width: 480px) {
  #gallery li {
    width: 28.3333%;
  }
}
Steve Isaacs
Steve Isaacs
2,112 Points

This was the initial question: Inside the media query, select the list items inside the gallery and add a width of 28.3333%.

5 Answers

I just used the exact same code and it worked. Are you trying to create your own media query or are you using the one at the bottom of the provided code?

Felix Yakubov
Felix Yakubov
17,475 Points

I cant find this challenge but check if you talk about ID, Class or a tag

Steve Isaacs
Steve Isaacs
2,112 Points

Yeah, it's an id. Same as the workspace file we've been building.

Felix Yakubov
Felix Yakubov
17,475 Points

Thats strange.. try

gallery ul li

:/ cant think why. Could you send link to video?

Felix Yakubov
Felix Yakubov
17,475 Points

It works fine sorry,

.contact-info a {
  display: block;
  min-height: 20px;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  padding: 0 0 0 30px;
  margin: 0 0 10px;
}

@media screen and (min-width: 480px) {
  #gallery li {width:28.333%;}
}
Steve Isaacs
Steve Isaacs
2,112 Points

I was copy and pasting the media query to the top of the code for easy scanning. I just fixed the code at the bottom of the page now it works - thanks!