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

CSS Build a Responsive Website Responsive Design Content Defined Breakpoints

Second 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

As 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.

Thanks Jason

daniela
daniela
2,629 Points

Crystal,

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;
} 

}

Thanks,

you 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;
    } 
}

Thank You :-)

Ok I Will Make The Necessary Changes. :-)