How to build a two column fluid layout with Twitter Bootstrap v3.0

90,582

The grid in Bootstrap 3 is now fluid by default (http://getbootstrap.com/getting-started/#migration-dropped). You just need to use .row and .container..

<div class="container">
    <div class="row">
        <div class="col-md-2">
            Sidebar content
        </div>
        <div class="col-md-10">
            Body content
        </div>
    </div>
</div>

This however will not be 100% width. If you want 100% width you can do something like this.. http://www.bootply.com/86324

UPDATE: 3.0.1 and later use container-fluid for full width.

Share:
90,582
RonyK
Author by

RonyK

Updated on September 23, 2020

Comments

  • RonyK
    RonyK over 3 years

    Since bootstrap removed the *fluid css classes in v3.0, I couldn't find a way to build a two-column fluid layout. The goal is to achieve a layout similar to the Fluid Layout example in their old documantation: http://getbootstrap.com/2.3.2/scaffolding.html#layouts