Bootstrap fluid layout - fixed width of sidebar

前端 未结 2 1605
野的像风
野的像风 2020-12-24 03:46

i have a fluid layout based of twitters bootstrap.

相关标签:
2条回答
  • 2020-12-24 04:19

    I think this is what you need: http://jsfiddle.net/U8HGz/1/

    0 讨论(0)
  • 2020-12-24 04:28

    I think you are looking something like this:

    <div class="sidebar span4">
        this is my fixed sidebar
    </div>
    <div class="main">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span2">this is fluid</div>
                <div class="span3 offset1">yeah!</div>
                <div class="span6">Awesome!</div>
            </div>
            <div class="row-fluid">
                <div class="span6">1 half</div>
                <div class="span6">2 half</div>
            </div>
        </div>
    </div>
    

    here´s a fiddle for your convenience: http://jsfiddle.net/TT8uV/2/

    As as general note:

    You don´t need to use bootstrap as your 'main container', so you can place your sidebar side-by-side with a grid system (like bootstrap fluid and responsive). This way you have A LOT of control of the sidebar, without affecting the actual content.

    Hope it works for you.

    0 讨论(0)
提交回复
热议问题