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 Unused CSS Stages Media Queries Media Features and Media Types

Ian de Jesus
Ian de Jesus
8,559 Points

Right Code But Bummer :(

This is my code

@media screen and (max-width: 768px)  {
    body {
        background: #FF6347;
    color: #FFF;
    }

@media screen and (max-width: 480px){
  body{
    background: #4682B4;
  }
}

I wonder why its wrong?

3 Answers

Your first media query is missing the closing curly brace (}).

Well it depends what you were going for. If you go full screen in your regular laptop or desktop-sized browser window, it'll be white because no color is set for that resolution. However, if you mess around with the resolutions and re-size it to a certain extent, it'll change color to orange. If you make it even smaller, it'll turn blue.

http://jsfiddle.net/purgified/JD2DP/embedded/result/

Edit: Haha! I totally missed the braces too.