Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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. :-)