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

Max grok
Max grok
8,234 Points

Responsive Web - Media Query Issue - Code Challenge

Instructions are to add width 28.3333% for devices 480px for gallery items, this is the code I wrote to solve the task, but it's not working.

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

4 Answers

Max grok
Max grok
8,234 Points

I figured it out. You are supposed to adjust the pre-existing code for the selected elements, adding the media screen before the #gallery li, then adjusting the width to 28.3333%. It is side-by-side with the other properties under the pre-existing #gallery li.

Roberto Alicata
PLUS
Roberto Alicata
Courses Plus Student 39,959 Points

Your code is ok, are you sure you are using the media query already defined at the bottom of the challenge? You only need to add " #gallery li { width: 28.3333%; } " there.

Max grok
Max grok
8,234 Points

It specifies that the width should come into play only for media with a minimum of 480px.

God I feel stupid. I only realized what you said and looked at the bottom of the editor.

Thanks everybody!

Max grok
Max grok
8,234 Points

how do I delete this? I meant to comment on the first answer....

I'm having the same issue. Kind of annoying seeing as I want my points lol