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 trialFelipe Henao
2,563 Pointsproblems with media queries
/*media queries*/
@media screen and (max-width: 705px){
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6 {
width:100%;
}
#love-at-first-bite img {
display : none;
}
}
6 Answers
Chad Shores
Courses Plus Student 8,868 Pointsis love-at-first-bite a class or id selector?
here's how it should look as a class selector
.love-at-first-bite { }
and as an id selector:
#love-at-first-bite { }
Felipe Henao
2,563 PointsI tried both and it dosen't work ...... love-at-first-bit is a image from html and in my html is like that :
<div class="grid_2 omega"> <img src="img/love-at-first-bite.gif" alt="Love at First Bite"> </div>
and in my css i want to hide this image with this code :
@media screen and (max-width: 705px){ .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 { width:100%; } .love-at-first-bite { display:none; } }
because my task ask me for this :
Add the appropriate CSS within the same media query that will force the βlove at first biteβ illustration to disappear.
Dan Gorgone
Treehouse Guest TeacherThe answer may be to apply the "display: none" property to img, which would apply it to all img I realize, but it's worth a shot in this case.
Chad Shores
Courses Plus Student 8,868 PointsHas the class "love-at-first-bite" been applied to the img tag in the HTML?
Felipe Henao
2,563 Pointsyes i have apply it .
Felipe Henao
2,563 Pointsbut didn't work .