2016-11-29 76 views
1

我有一個表,它有一個min-width。當它有幾個上下文時,滾動條位於頁面中心。我想在底部滾動條。但是,這並不工作:我要在底部滾動條

<body> 
 
    <div class="container-fluid" style="position: relative;overflow:auto;height:100%"> 
 
    <div class="row clearfix"> 
 
     <div class="col-xs-3" id="pollutanttree"></div> 
 
     <div class="col-xs-9"> 
 
     <div class="btn-group"> 
 
      <button class="btn btn-primary" type="button"> 
 
      add 
 
      </button> 
 

 
     </div> 
 
     <table class="table table-striped table-bordered" style="min-width:1200px"> 
 
      <thead> 
 
      <tr> 
 
       <th> 
 
       name 
 
       </th> 
 

 
      </tr> 
 
      </thead> 
 

 
      <tbody> 
 

 
      </tbody> 
 

 
     </table> 
 

 
     </div> 
 

 
    </div> 
 
    <div class="row clearfix" style="position: absolute;bottom:0px">this should in bottom ,on the scroll bar</div> 
 
    </div> 
 

 
</body>

回答

2

你可以做到這一點通過添加以下代碼:

body{ 
    height:100vh; 
} 

,這意味着你是給身體全屏幕高度

1

您可以嘗試下面的代碼

body, html, .container-fluid{ 
height:100%; 
}