Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.