Bootstrap 3.0 - Fluid Grid that includes Fixed Column Sizes

前端 未结 8 558
梦谈多话
梦谈多话 2020-11-29 16:37

I am learning how to use Bootstrap. Currently, I\'m wading my way through layouts. While Bootstrap is pretty cool, everything I see seems dated. For the life of me, I have w

相关标签:
8条回答
  • 2020-11-29 17:03

    or use display property with table-cell;

    css

    .table-layout {
        display:table;
        width:100%;
    }
    .table-layout .table-cell {
        display:table-cell;
        border:solid 1px #ccc;
    }
    
    .fixed-width-200 {
        width:200px;
    }
    

    html

    <div class="table-layout">
        <div class="table-cell fixed-width-200">
            <p>fixed width div</p>
        </div>
        <div class="table-cell">
            <p>fluid width div</p>    
        </div>
    </div>
    

    http://jsfiddle.net/DnGDz/

    0 讨论(0)
  • 2020-11-29 17:06

    Why not just set the left two columns to a fixed with in your own css and then make a new grid layout of the full 12 columns for the rest of the content?

    <div class="row">
        <div class="fixed-1">Left 1</div>
        <div class="fixed-2">Left 2</div>
        <div class="row">
            <div class="col-md-1"></div>
            <div class="col-md-11"></div>
        </div>
    </div>
    
    0 讨论(0)
提交回复
热议问题