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 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!