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 Unused CSS Stages Media Queries Media Features and Media Types

Jennifer Brown
PLUS
Jennifer Brown
Courses Plus Student 2,813 Points

Media queries

I'm having an issue with this code challenge. I believe I have the correct CSS for the media query but they are saying my answer is incorrect. It is giving me the message, "Did you specify the right width?" Can anyone tell me what I am doing wrong?

Challenge Task: Create a media query that sets the width of .wrap to 700px when the viewport is 800px or wider.

My Answer: @media screen and (min-width:800px){ wrap{ width:700px;} }

3 Answers

Mel Warhol
PLUS
Mel Warhol
Courses Plus Student 7,859 Points

Hey Jennifer,

You need to add a "." before the wrap selector...see below:

@media screen and (min-width: 800px) {
  .wrap {
      width: 700px;
    }
}
Mel Warhol
PLUS
Mel Warhol
Courses Plus Student 7,859 Points

: ) no worries..been there. Thank you for the vote!