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 trialCRYSTAL MORRIS
Courses Plus Student 2,809 PointsSecond Part Of Media Query NOT Working
Question 1 Write a media query at 705px where the layout begins to break, that forces grid_1 through grid_6 to span 100% width of the container.
Question 2 Add the appropriate CSS within the same media query that will force the βlove at first biteβ illustration to disappear.
@media screen and (max-width: 705px) {.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 { width: 100%; } {.love_at_first_bite.gif img { display: none;} }
4 Answers
Jason Anello
Courses Plus Student 94,610 PointsAs mentioned in the other answers, you have to remove that extra opening curly brace.
You also have to fix the selector for the image. You're trying to select an img
that is inside of an element with a class of "love_at_first_bite.gif" which doesn't match anything.
The hint they give you is "love at first bite" so they probably want you to use the alt
attribute of the image.
img[alt="Love at First Bite"] {
display:none;
}
You can use an attribute selector. The value has to match exactly, including capitalization.
daniela
2,629 PointsCrystal,
You have an extra { character before your .love_at_first_bite.gif part. See code below where I commented on the part to remove:
@media screen and (max-width: 705px) {
.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 {
width: 100%;
}
/*{ This is the part to remove */
.love_at_first_bite.gif img {
display: none;
}
}
CRYSTAL MORRIS
Courses Plus Student 2,809 PointsThanks,
Scott Harris
9,147 Pointsyou have and extra "{" before .love - take that away and you should be good to go.
@media screen and (max-width: 705px) {
.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 {
width: 100%;
}
.love_at_first_bite.gif img {
display: none;
}
}
CRYSTAL MORRIS
Courses Plus Student 2,809 PointsThank You :-)
CRYSTAL MORRIS
Courses Plus Student 2,809 PointsOk I Will Make The Necessary Changes. :-)
CRYSTAL MORRIS
Courses Plus Student 2,809 PointsCRYSTAL MORRIS
Courses Plus Student 2,809 PointsThanks Jason