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
Robert Borsey
Courses Plus Student 9,636 Pointscss challenge
Add the appropriate CSS code to the media query so that images within the ".cupcake" div disappear when the device or browser width is at most 480px wide.
can anybody help me with this I have been stuck for a while. thank you, I will appreciate it very much
2 Answers
Alex Heil
53,547 Pointshey robert, you're near so let's compare your css with the question ;) when you set .cupcake {display:none;} - what would that do actually? right, it will hide the complete class named "cupcake". now let's check the question again, there it says "... so that images within the ".cupcake" div disappear " - I guess you already see the difference, right? your task is to only hide the images inside the class instead hiding the whole class. perhaps you wanna try to change the selector from .cupcake to .cupcake img {display:none;} and if doing so there should be a good chance that it will work - hope that helps ;)
Kevin Korte
28,149 PointsWhat has you stuck exactly? I don't want to just feed you an answer.
Is it writing a media query? Selecting the div with a class of cupcake? Calling it to disappear?
Robert Borsey
Courses Plus Student 9,636 Pointsyes that is what im stuck on I answered the first to questions ive tried .cupcake{ display: none; } .cupcake{ width: 95% }
and a bunch more if you can help that will be great.
Robert Borsey
Courses Plus Student 9,636 PointsRobert Borsey
Courses Plus Student 9,636 PointsThank you for responding Alex, I was stuck on this problem for a while. I'm new to this and kind of feel stupid sometimes when something so simple like leaving the ing out. But I do like when people help that's cool. Hoping to get pretty good at this programming stuff so I can help other people learn as well.
So last night after watching the video like 100 time and pulling my hair out I finally got it . I appreciate your help thank you again
Alex Heil
53,547 PointsAlex Heil
53,547 Pointsyou're welcome robert - and great to hear that your issue is solved. also be sure that all of us ever overlooked something like this - and not only once ^^ plus here at treehouse it's a place to learn so whenever you have a question, don't hesitate to ask ;)