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

Quiz functions correctly, but it says my answer is wrong (media queries)

Next, create a new media query that sets the body element's background color to #4682B4 if the viewport width is 480px or less.

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

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

When I shrink the browser, it shows that I did it, but the test says my background color is wrong.

2 Answers

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hey Juliet DeAmicis,

It looks like you're missing the closing } in your media queries. :)

Adding a missing } doesn't work, I tried that. But when i used lowercase for the color value instead of uppercase it worked. It might be some kind of a bug maybe?

Edit: Sorry, it's just me being stupid. I just used the closing } in the media query above ;)