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
Samuel Scurville
Courses Plus Student 1,893 Pointsmaking an image disappear
i cant seem to get an image to disappear "display: none;" doesnt seem to work?
4 Answers
Kevin Korte
28,149 PointsYou need to use the "img" selector with class selector .cupcake to select all images inside of the cupcake div.
Eddie Flores
9,110 Pointsimg {
display: none;
}
Did you try that in your CSS file? Or associate it to the correct class or id?
Samuel Scurville
Courses Plus Student 1,893 Pointsi was doing it for the code challenge in adaptive design, implementing media queries, "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." so i was using ".cupcake{ display: none; }
Kevin Korte
28,149 PointsIt's more than likely your selector choice. What does the html and css look like?
Samuel Scurville
Courses Plus Student 1,893 Pointsi was doing it for the code challenge in adaptive design, implementing media queries, "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." so i was using ".cupcake{ display: none; }
Kevin Korte
28,149 PointsYou were selecting the entire div, but it only wants you to select the images inside of that div, so you'll have to adjust your css selector to match.
Also make sure that whole css block is inside of the appropriate media query.
Samuel Scurville
Courses Plus Student 1,893 Pointshow to adjust it properly?
Samuel Scurville
Courses Plus Student 1,893 PointsSamuel Scurville
Courses Plus Student 1,893 Pointsi tried, its still not working. what should i type because im just being extremely stupid now
Kevin Korte
28,149 PointsKevin Korte
28,149 Points.cupcake img {display:none;}
Samuel Scurville
Courses Plus Student 1,893 PointsSamuel Scurville
Courses Plus Student 1,893 Pointsi did it backwards haha. thank you so much!!
Kevin Korte
28,149 PointsKevin Korte
28,149 PointsYou're welcome!
Samuel Scurville
Courses Plus Student 1,893 PointsSamuel Scurville
Courses Plus Student 1,893 Pointshi mate, im having the same trouble with this question now "Add the appropriate CSS within the same media query that will force the “love at first bite” illustration to disappear."
any help please?