Full width layout with twitter bootstrap

前端 未结 10 539
不知归路
不知归路 2021-01-29 19:37

I\'m trying to accomplish a layout similar to this one: http://dribbble.com/shots/829195-Slate/attachments/86422

My project uses Twitter Bootstrap with responsive desig

相关标签:
10条回答
  • 2021-01-29 20:02

    As of the latest Bootstrap (3.1.x), the way to achieve a fluid layout it to use .container-fluid class.

    See Bootstrap grid for reference

    0 讨论(0)
  • 2021-01-29 20:05
    *{
       margin:0
       padding:0
    }
    

    make sure your container's width:%100

    0 讨论(0)
  • 2021-01-29 20:09

    Update:

    Bootstrap 3 has been released since this question was originally answered in January, so if you are a BS3 user, please refer to the BS3 documentation. For those still on BS2, the original answer still applies. If you are interested in switching from 2 to 3, see the migration guide.

    Original answer:

    From the bootstrap 2 docs:

    Make any row "fluid" by changing .row to .row-fluid. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.

    Code

    <div class="row-fluid">
      <div class="span4">...</div>
      <div class="span8">...</div>
    </div>
    

    This, in conjunction with setting the width of your container to a fluid value, should allow you to get your desired layout.

    0 讨论(0)
  • 2021-01-29 20:10

    You'll find a great tutorial here: bootstrap-3-grid-introduction and answer for your question is <div class="container-fluid"> ... </div>

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