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 Adaptive Layouts with Media Queries

media query width?

I input

/*@media only screen and (min-width: 1000px) {  
    .wrap {
        width: 980px;
    }
}*/

for my code and yet it keeps telling me to check that I've got the proper width? The objective states to make a new media query that sets the .wrap to 980px if the view port is 1000px or higher. What am I getting wrong?

1 Answer

Chris Shaw
Chris Shaw
26,650 Points

Hi Neil,

The only issue I see with your code is you have it commented out with /**/ which will cause the task to fail as commented code is ignored by the browser.

@media only screen and (min-width: 1000px) {  
    .wrap {
        width: 980px;
    }
}

Yeah I did because I wasn't sure if it would display properly in the forum, I didn't comment it out in the code editor.

It turns out the It was giving me wrong answer because I did not give a line of space between that media query and the previous media query. Once I put the space in and resubmitted it went green.

Chris Shaw
Chris Shaw
26,650 Points

Good to hear, let us know if you have any other issues