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 trialOscar Blanco
Courses Plus Student 1,626 PointsRED IS NOT WORKING WITH RIGHT SYNTAX!!
MY blue is displaying but not red, ive checked answeres in previous student questions and seems my syntax is correct, PLEASE HELP!
@media (max-width: 480px) { body { background: darkred; } }
5 Answers
Steven Parker
231,275 PointsBoth colors work for me when I fork the snapshot. I only need to adjust the window size to see them (since they are done in media queries that only take effect at certain window widths).
Are you sure your window size was set to meet the media query requirements?
Oscar Blanco
Courses Plus Student 1,626 PointsI think its a browser issue in displaying the colors, I went to the next course on media queries and those displayed correctly. Thank you, non the less!
Billy Chui
6,852 Pointssame problem with me. must be the web browser' issue. But then i changed the max-width to 600px instead of 480px and is work.
Oscar Blanco
Courses Plus Student 1,626 PointsThanx for the tip, Billy! thats probably whats was wrong with mine as well but for now I gotta keep on trucking!
Ryan Baeschlin
Front End Web Development Techdegree Student 9,854 PointsI had the same issue. I was using chrome and installed the window re-sizer add-on that was in the teacher's notes. https://chrome.google.com/webstore/detail/window-resizer/kkelicaakdanhinjdeammmilcgefonfh?hl=en
When I made my browser as small as possible it wouldn't go under 500px, so it would never get to the 480px. Maybe your window isn't getting small enough as well.
I had to go with these values to make it work properly:
@media (max-width: 960px) { body { background: royalblue; } }
@media (max-width: 600px) { body { background: darkred; } }
@media (min-width: 601px) and (max-width: 700px) { body { background: seagreen; } p { color: white; } }
Arcel Derosena
Front End Web Development Techdegree Student 5,241 PointsYeah I think it is a browser issue, I'm using chrome, but wants I increased the with to 600px too, it changed to darkred.
Muhammad Khan
Courses Plus Student 8,772 PointsSame problem with me. red does not work with 480px but when I changed 505px in place of 480px it works. I'm using chrome, it might be a browser issue.
Oscar Blanco
Courses Plus Student 1,626 PointsOscar Blanco
Courses Plus Student 1,626 PointsSo at first blue was working and now nothing is working. Tried opening it up on internet explorer same issue. Here is my workspace, PLEASE HELP!
https://w.trhou.se/qe0hpgwbe9