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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Q Staley](https://uploads.teamtreehouse.com/production/profile-photos/8286722/micro_q_staley.jpg)
Q Staley
Front End Web Development Techdegree Student 7,368 PointsMedia Queries are not taking effect in browser?
I've begun with the exact workspace from the video, using Chrome Browser. You can see my media query at the bottom of my CSS page (https://w.trhou.se/9birwckhdd).
I currently have this html code in place:
@media all (max-width: 720px) {
.primary-content,
.secondary-content {
background-color: red;
}
}
But when I shrink my browser width, my page is unaffected. Any suggestions?
1 Answer
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsActually, I think it was having the word "all" without the "and". If you leave both words off (like in the 2nd example), it should also work.
Q Staley
Front End Web Development Techdegree Student 7,368 PointsQ Staley
Front End Web Development Techdegree Student 7,368 PointsI solved my own problem. It seems the following,
requires an 'all and' after @media.
I got the following snippet to work properly, including both the "all and . . ." after "@media" because without it, despite what the original video showed, my browser size had no effect on the page.