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 trialScott Crawford
37,861 Pointsmedia query issue on the bootstrap Framework Basics
I can't get the media queries to work in the bootstrap framework basics. As soon as I start to type max-width it turns red along with the first curly bracket. I've went through the rest of the code and I don't think I'm missing anything above to cause an error. I'm using the treehouse workspaces. Anyone else have the same error? Same thing occurs on both media sizes.
@media (max-width: 991px) { .jumbotron { padding-top: 120px; padding-bottom: 20px; background-position: 10% 10%; } }
@media (max-width: 767px) { .navbar { min-height: 60px; } .main-logo { width: 82px; margin-top:20px; } .jumbotron { padding-top: 80px; margin-bottom: 32px; } .lead { margin-bottom: 40px; } }
1 Answer
Andrew Dushane
9,264 PointsYou need to specify the media type - ie @media all and (max-width etc. or @media screen and (max-width