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 CSS Basics (2014) Enhancing the Design With CSS Media Query Basics

Tobias Laursen
Tobias Laursen
5,326 Points

@media (min-width: 481) and (max-width: 700px) not working

In the last part of the video we are writing the following code:

@media (min-width: 481) and (max-width: 700px) { body { background: seagreen; } p{ color: white; } }

But when i go into preview, the browser is not changing accordingly. the @media (max-width: 960px) { body { background-color: royalblue; }

}

@media (max-width: 480px) { body { background-color: darkred; } } Works fine though.

Can you see what im missing?

2 Answers

Joel Bardsley
Joel Bardsley
31,244 Points

Hi Tobias, you're just missing the px after the 481 in your min-width declaration.