max page/block width with responsive theme
Permalink
I've installed the Bootswatch theme and I'd like to limit the width of pages/blocks. I tried to add some CSS to bootstrap-responsive.css, bootstrap-responsive.min.css and to the theme template CSS but it didn't work. Here's my code:
Why isn't this working? It doesn't seem to be a caching issue. How can I accomplish my goal?
Edit: Maybe due to 768 missing px...hang on...
Edit 2: No. The px should have been there but there's still no effect.
@media (min-width: 768px) { width:768 !important; }
Why isn't this working? It doesn't seem to be a caching issue. How can I accomplish my goal?
Edit: Maybe due to 768 missing px...hang on...
Edit 2: No. The px should have been there but there's still no effect.
try using max-width
@enlil: You're right that it should be max-width but the width is still not limited.
Corrected code:
Corrected code:
@media (min-width: 768px) { max-width:768px !important; }
Have you tried:
@media screen and (max-width : 768px){ .something{ max-width : 768px } }
@steevb: I'm pretty sure that adding "screen" wouldn't make a difference and that changing min- to max- would have the effect that the rule would apply on screens up to 768px wide, which would not be helpful. Thanks for the reply, though.
For anyone who is interested, it turns out that I needed to specify a selector. Problem solved thanks to Bootswatch's developer.