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 How to Make a Website Responsive Web Design and Testing Write CSS Media Queries

I'm having an issue with the code challenge in Media Queries for Standard Devices

Hey guys,

I typed this in the following code in and the background color was changed to navy but was not the answer the challenge is looking for.

@media screen and (min-width 480px) { body { background-color: navy; } }

Am I missing something here? I tried variations with @media screen only and with min-device-width in parentheses.

Any help is appreciated.

P.S. Treehouse rocks!

-Luke

Ok guys, I jumped the gun on submitting a forum discussion.

The missing : between (min-width: 480px) was causing the error.

-Luke

1 Answer

everything is correct, except the background-color.

@media screen and (min-width 480px) { body { background: navy; } }

Hi Emilio,

background is the shorthand property for the individual background properties. It's ok to use background-color: navy if all you need to do is set the background color. You can use either one.

The problem here was the missing colon that Luke noted in the comment.