I’m using a fluid Twitter Bootstrap layout for my design and am about to make it responsive. Consider a grid such as this:
<div class="row-fluid">
<div class="span4"></div>
<div class="span8"></div>
</div>
What is the best way to hide span4 and let span8 take up the entire width, to be used when the screen gets smaller?
Using a media query with whatever min/max width set
.span4todisplay: none;Then, add
.span8to the rule for.span12for everything below whatever width you hide.span4as all that work is already done for you by bootstrap, so no need to duplicate. It will look something like this:(That last bit of code is just an example, but there will be something like it in bootstraps scaffolding.)
Hope that helps 🙂
EDIT:
This could work, I tested it using dev tools on the bootstrap site and it seemed to work. Again, in a media query: