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

Problem with code challenge

it seems an easy assignment, I need to set the background color to #4682B4 for resolutions smaller then 480px. I have following code but it gives me an error asking whether I specified the right background color? The color is exact the same as in the assignment :s I'm clueless here

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

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

3 Answers

Your code is missing the closing bracket for the first opening bracket.

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

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

Jan Van Raemdonck
Jan Van Raemdonck
22,961 Points

Try the background-color property

Aah yes, the brackets that's it. So simple :) Thanks for the replies, it's great to have such quick responses!