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

seagreen not applying

I have no idea why, but this section of the code seems to be inactive. The red and blue work fine. I heard a rumor about needing to add more brackets? but i have no idea where or why.

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

I am having issues with the seagreen as well. Royal Blue background worked, then I had issues with the darkred and did the "inspect element" and left dock and that works now. Can't figure out why seagreen would not work. Chrome issue?

4 Answers

I actually figured it out-my mother who's a coder figured it out-! I placed the seagreen rule below the @media(max-width:480), so it did not apply. cascading-i need to keep an eye on the fact it cascades :P Thank you for your help, though!

Gabriel Pierce-Lackey
Gabriel Pierce-Lackey
11,014 Points

It works perfectly for me, maybe you're not going below the 700px?

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

Shawn Brome
Shawn Brome
3,395 Points

the @media only scree and... isn't working for me. I tried it with @media (max-width: 960) {body {background: royalblue;}} and nothing changes. I also tried @media screen and (max-width: 960) { body {background: royalblue;}} and still no affect on resizing the screen.