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

What is wrong with my CSS???

Code challenge stage 13: Media Queries. question 2

I just can't seem to push the correct through the code challenge. Can someone point me in the right direction please. baffled. . .

my effort:

@media screen and (max-width: 480px) { 
    body {
        background: #4682B4; 
    } 
}
Andrew Shook
Andrew Shook
31,709 Points

Did you delete the media query from question 1? Because i just pasted your code in and passed the challenge with it.

it works now! thanks anyway.

1 Answer

Sreng Hong
Sreng Hong
15,083 Points

Hi Alex

You code seem fine to me. I've copied and pasted into my code challenge, it's passed.

Please try the code challenge again, but make sure you don't delete the first task.

It should look like this:

/* Complete the challenge by writing CSS below */
@media screen and (max-width: 768px) { 
    body {
        background: #ff6347;
        color: #fff;
    } 
}

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

Thank you, it works.