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 trialJoshua Cohen
3,582 PointsStage 13 task 2 of 3 : What's wrong?
What did I do wrong here?
Next, create a new media query that sets the body element's background color to #4682B4 if the viewport width is 480px or less.
/* Complete the challenge by writing CSS below */ @media screen and (max-width: 768px) and (min-width: 481px){ body { background: #FF6347; color: white; } @media screen and (max-width: 480px) { body {background: #4682B4; } }
Bummer! Did you specify the right background color?
3 Answers
banu babanu
8,152 PointsThere is an error with the system.If you go back to the task 1 you will find the code that you wrote for the task 2.
But don't forget to properly close the curly brackets for the first media query and also the second condition is not necessary.
@media screen and (max-width: 768px) {
body {
background: #FF6347;
color: white;
}
}
Erik McClintock
45,783 PointsJoshua,
Without a link to it, I'm not sure, but it's possible that the challenge is checking rigidly for the "background-color" property and won't accept the shorthand "background". Have you tried that?
Erik
Joshua Cohen
3,582 PointsThe issue was with not closing the brackets. Thanks so much!