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 trialGabriel Kierkegaard
4,209 Points@media all queries not working
Hi, I'm having trouble getting this to work. I even pasted in the teachers project files into my own workspace, just to make sure I hadn't missed anything.
/*Media Queries ---------------------*/
@media all (max-width: 960px) {
body {
background: royalblue;
}
p {
color: white;
}
}
Rich Donnellan
Treehouse Moderator 27,696 PointsFixed formatting.
1 Answer
Kundai Musarurwa
10,842 PointsTry adding the word 'and' after all as below
@media all and (max-width: 960px) {
body { background: royalblue; }
p { color: white; }
}
Rich Donnellan
Treehouse Moderator 27,696 PointsFixed formatting.
Gabriel Kierkegaard
4,209 PointsHi thanks for the help, it worked. I just don't understand why I had to put and in since the teacher didn't?
Gabriel Kierkegaard
4,209 PointsGabriel Kierkegaard
4,209 PointsI can get the seagreen part to work as the only thing. But the royalblue and darkred won't display.