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 trialbrendacontreras
1,992 PointsHi! I'm trying to write the second breakpoint of the responsive web design challenge and i can't seem to get it right.
I typed :
@media screen and (min-width:660px) {
body {
background-color: darkgreen;
}
}
(even tried without the '-color') What am i doing wrong?
4 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Brenda,
Did you close off your previous 480px media query? This media query won't work if the previous one isn't closed off.
brendacontreras
1,992 PointsHi Jason,
I did closed the previous media query. Also, I did it again and made sure the code was at the end of everything but it still thinks i did it wrong. I don't get it.
Jason Anello
Courses Plus Student 94,610 PointsOk, can you post both media queries? In other words, post all of the css that you have added but not what's already there.
brendacontreras
1,992 PointsIt says: Bummer! Did you change the background color to darkgreen for devices larger than 660px?
And I typed:
@media screen and (min-width:480px) {
body {
background-color: navy;
}
@media screen and (min-width:660px) {
body {
background-color: darkgreen;
}
brendacontreras
1,992 PointsMmmm, it looks all in the same line but it's not. sorry.
Chris Shaw
26,676 PointsYou haven't closed off your media queries as Jason mentioned earlier, you should have the below.
@media screen and (min-width:480px) {
body {
background-color: navy;
}
}
@media screen and (min-width:660px) {
body {
background-color: darkgreen;
}
}
brendacontreras
1,992 PointsOh!! You're right! Now it works. Thank you so much to both of you. :)