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

Implementing Media Queries Challenge

I'm having an issue passing the challenge, "Add the appropriate CSS code to the CSS to make images scale with the fluid layout." in the Code Challenge: Implementing Media Queries.

I've added img { width: 100%;} within the media query, and even tried it with the class cupcake, menu, or even the container id preceding it. Is there something else to it? The website seems to be scaling perfectly while the challenge tells me it's not scaling. I've tried on both Safari and Chrome so far. I've also tried max-width: 100%, but still nothing. Thanks in advance, guys.

I am new to treehouse and web design. I have been studying for the past couple of weeks and I am having a very difficult time with this entire section. I have watched over and over the video and I can't seem to get a grip on it. It just isn't making sense to me. Please, any advice?

2 Answers

J.T. Gralka
J.T. Gralka
20,126 Points

Alejandro,

Remember that you want the minimum (or maximum) size of your images to scale. Try using the max-width attribute instead of just width, and make sure your img rule is correct to being with.

I hope that helps!

Best,

J.T.

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Alejandro,

That is correct, but you need to add the width declaration to the existing img rule. You don't need to add it in the media query just yet.