Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try this: <a href="http://jsfiddle.net/andresilich/6vPqA/2/" rel="noreferrer">http://jsfiddle.net/andresilich/6vPqA/2/</a></p> <p><strong>CSS</strong></p> <pre><code>.container-fluid &gt; .sidebar { position: relative; top: 0; left:auto; width: 220px; /* width of sidebar */ } .left { float:left; } .right { float:right; } .container-fluid &gt; .content { margin: 0 240px; /* width of sidebars + 10px of margin */ } </code></pre> <p><strong>HTML</strong></p> <pre><code>&lt;div class="sidebar left"&gt; &lt;div class="well"&gt; &lt;h5&gt;Sidebar&lt;/h5&gt; ..... &lt;/div&gt; &lt;/div&gt; &lt;div class="sidebar right"&gt; &lt;div class="well"&gt; &lt;h5&gt;Sidebar&lt;/h5&gt; ..... &lt;/div&gt; &lt;/div&gt; </code></pre> <hr> <p>Per comments, i updated my answer to carry the possibility to switch between right and left sidebar with just a class.</p> <p>Now you can use the following in the <code>&lt;div class="content"&gt;</code> div:</p> <p><strong>CSS</strong></p> <pre><code>.fixed-fluid { margin-left: 240px; } .fluid-fixed { margin-right: 240px; margin-left:auto !important; } .fixed-fixed { margin: 0 240px; } </code></pre> <p>Demo: <a href="http://jsfiddle.net/andresilich/6vPqA/3/show/" rel="noreferrer">http://jsfiddle.net/andresilich/6vPqA/3/show/</a> Edit: <a href="http://jsfiddle.net/andresilich/6vPqA/3/" rel="noreferrer">http://jsfiddle.net/andresilich/6vPqA/3/</a></p> <hr> <p>Another user asked about if this method can be adapted to the latest version of the bootstrap (v2.0 at the time of writing) so here is a demo that uses it:</p> <p><a href="http://jsfiddle.net/andresilich/6vPqA/13/" rel="noreferrer">http://jsfiddle.net/andresilich/6vPqA/13/</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload