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 trial
nicholasmartin2
7,172 PointsAdding Breakpoints for Devices: Body background color remains white after breakpoints.
Hello everyone. I'm working my way through "Adding Breakpoints for Devices" and have hit a snag. Below, I've pasted the code for the breakpoints used in the lesson. Once I've expanded my browser (Chrome) beyond 480px, the body of my pages remain white; however, when expanded to full screen mode (beyond 660px), a small border will appear on the left and right sides of the page that appears dark green. The body still remains white. Any thoughts on this? I'm happy to share the main.css code in a separate comment, if that might help. Thanks!
@media screen and (min-width: 480px) {
body {
background-color: navy;
}
}
@media screen and (min-width: 660px) {
body {
background-color: darkgreen;
}
}
1 Answer
Navid Mirzaie Milani
6,274 Points@Nicholas Martin when i just created a workspace here at Threehouse and resizing my window i see a green and a blue page. The CSS aboce says when the window is 660px or higher the background should be green , and if the window is between 480 and 660 it will be the background navy.
Just check it you will see. If you have other questions ask :). Goodluck.
nicholasmartin2
7,172 Pointsnicholasmartin2
7,172 Points@Navid Mirzaie Milani Thanks for the response! Unfortunately, even with the correct coding that's already been entered, the media queries appear to be doing nothing on multiple browsers. I'm now left with a white background. I'm wondering if there's an error with my main.css? I've included the code below.