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

Media Queries Code Challenge, STUCK!

The code challenge is "Create a media query that sets the 'body' element's background color to #FF6347 and its text color to white if the viewport width is 768px or less."

My Code Is "@media screen and (min width: 768px){

body{

background:#FF6347;

color:#FFFFFF;

}

}

And the error I get is "Bummer! Did you specify the right background color?" YES I DID! I copy/paste what color you told me to put

Can anyone please help :) Thank you.

4 Answers

:D I got what I was doing wrong

min width

should have been

max-width.

Zen Hess
Zen Hess
6,700 Points

Nice! That section was a bit confusing to me as well. Glad to hear you were able to resolve the issue on your own.

Marcus Tisäter
Marcus Tisäter
4,886 Points

Isn't it suppose to be

background-color: #FF6347;

It Was Not necessary in this case. It worked the way I put it, just needed to edit the @media screen and () function.