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 Adaptive Design Implementing Media Queries

Sean Metcalf
Sean Metcalf
1,631 Points

Media Query

Hi there,

For this challenge, I'm attempting to make images within the .cupcake div disappear when at screen resolutions 480px or less.

While incorrect, the code I have entered to accomplish this is:


/* Mobile ----------- */ @media screen and (max-width : 480px) {

  .cupcake img {
    visibility: hidden;
  }
}

Do you have any advice as to why this code may be incorrect?

Thanks in advance,

-Sean

1 Answer

Patrick Gerrits
Patrick Gerrits
14,614 Points

Well the code is correct, only for this exercise you do need another code. Instead of visibility try the other CSS for display or not displaying some elements.

(Oeh i think i left a big clue... )

Sean Metcalf
Sean Metcalf
1,631 Points

Thanks for your help Patrick!