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 trialThomas Guppy
3,307 PointsMedia Queries. Problem on first challenge
I'm certain I have this right, but its not being accepted:
task 2: Next, create a new media query that sets the body element's background color to #4682B4 if the viewport width is 480px or less.
I have entered the color exactly as written above:
@media screen and (max-width: 480px) { body { background: #4682B4; } }
but i keep getting this message: Bummer! Did you specify the right background color?
Have i done something wrong or is the task faulty?
Thomas Guppy
3,307 PointsI tried to grab the link, now task one is doing the same thing:
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 answer:
media screen and (max-width: 768px) { body { background: #FF6347; color: #FFF; }
link is: http://teamtreehouse.com/library/css-foundations/media-queries/media-features-and-media-types
3 Answers
Adam Sackfield
Courses Plus Student 19,663 PointsI just passed that question with this.
@media screen and (max-width: 768px) {
body {
background: #FF6347;
color: white;
}
}
Thomas Guppy
3,307 PointsThanks that worked... Strange that i got through the other day with a hexidecimal for the color value.
Diane Houghton
5,773 PointsAre they looking for background-color: #4682B4? Shouldn't make a difference, but they may want something more specific.
Thomas Guppy
3,307 PointsI don't know what changed but I have passed 'task 2' using the exact same code as the other day.
Thanks for the response.
Adam Sackfield
Courses Plus Student 19,663 PointsAdam Sackfield
Courses Plus Student 19,663 PointsLooks correct to me. Do you have the link to the question and I will take a look whats going on