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 trialSlava S
3,112 Pointsbody element not recognized in code
For some reason the workspace is highlighting the 'body' element with red and the media query is not working, but I am not sure what could be wrong with it:
@media screen and {min-width: 480px) { body { background:navy;}
}
Thank you in advance.
2 Answers
Simon Duchaine
14,441 PointsIf you wrote the code as you copied it in your comments, it looks like you've used a { instead of ( before your min-width declaration!
John Renzema
9,070 Points@media screen and {min-width: 680px) { body { background:navy;}
in the bold area above you have to different brackets. Happens to the best of us.