Twitter Bootstrap - 100% Height

前端 未结 3 1052
醉酒成梦
醉酒成梦 2021-02-01 08:44

I\'m trying to design an Admin panel for my application using twitter-bootstrap framework but i cannot get my layout to work.

I was inspired by this design:

相关标签:
3条回答
  • 2021-02-01 08:50

    Here is an example that works for Bootstrap 3..

    Make sure the HTML and body are both 100% height. Wrap the sidebar and content and then use position:absolute on the sidebar.

    http://www.bootstrapzero.com/bootstrap-template/basis

    Code: http://bootply.com/86704

    0 讨论(0)
  • 2021-02-01 09:07

    I'm not so sure Bootstrap's grid model is what you're looking for here. You may instead be looking for absolute positioning. For example:

    #sidebar, #content {
        position: absolute;
        top: 0;
        bottom: 0;
    }
    #sidebar { left: 0; width: 10em; }
    #content { left: 10em; right: 0; }
    

    Try it out.

    0 讨论(0)
  • 2021-02-01 09:13

    I am not sure if this is what you are looking for, but here it goes.

    just modified the CSS slightly. margin:0; to html, body tag.

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