Another way I did this is to create a div with the fluid-span identifier, and then use the following jQuery to apply the appropriate span class for Bootstrap to the middle content of the column - in essence, this will always make the average content relative to the size of the browser window of the user :
<div class="row"> <div id="fluid-span"> [content goes here] </div> <div class="span4"> [this is your right sidebar content] </div></div>
And here is jQuery:
$(function(){ var width = $(window).width(), new_class = width >= 1571 ? 'span17' : width >= 1411 ? 'span15' : width >= 1251 ? 'span12' : width >= 995 ? 'span8' : 'span8'; $('#fluid-span').removeClass('span17 span15 span12 span8').addClass(new_class);
Basically this is adding the corresponding span class to the div with the fluid-span identifier. Hope this helps anyone looking for a fix / fluid for Bootstrap!
One of the limitations of this is that it is not dynamic - if you change the size of the browser window, you need to refresh the page for the code to work. I'm sure someone with true jQuery skills could rewrite this better to do it :)
source share