Ok, so I'm trying to develop a better way to handle content deletion when changing screen size using media queries. However, I use the Twitter Bootstrap grid, and this makes it a little complicated, so I will be grateful to some pointers.
Suppose I have the following base grid: -
<div class="container-fluid"> <div class="row-fluid"> <div id="left-content" class="span6"> Left Content </div> <div id="right-content" class="span6"> Right Content </div> </div> </div>
I want to use css media requests, so when the screen width is reduced to a certain size, I want to hide #right-content
, which directly looks like this: -
@media screen and (max-width: 800px) { #right-content { display:none; } }
However, I really need to upgrade the class to #left-content
from span6
to span12
so that the content is as wide as the screen. I can obviously do this using JavaScript, but is it possible to do this with pure css?
source share