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

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 Plackey
Gabriel Plackey
11,064 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.