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.

CSS

Making my image disappear.

So I al learning media queries which I did not learn when I learned dreamweaver.

I am trying to make an image in a div disappear when the max-width is 480 px. The question does ask me to create a new media query but to make the adjustments in the one that has already been provided in the code. I have tried writing the code a few different ways including the one that is in the video which is #intro-img, #about{display:none;}.

Even when I have tried a few different things it tells me that the image will still be displayed on an area that is less than 480 px. I am a bit stomped, any suggestions / solutions will be greatly appreciated thx.

And yes I did pass my dreamweaver exam so if you have a question on that let me know.

3 Answers

Usually it'll be:

div img {

   display: none;

}

div being the div you're targeting, and img being the image within that div.

Hope that helps.

James Barnett
James Barnett
39,199 Points

How about a link to the code challenge you are stuck on?

Thank you sooooo much Joe Li it worked U r AWESOME!!!!