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 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,249 Points

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