fe263 fe263 - 4 days ago 5
CSS Question

I want to scroll bar in bottom

I have a table, it has a

min-width
. When it has a few context, the scroll bar is in the page centre. I want scroll bar at the bottom. But this doesn't work:



<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>




Answer

you can do this by adding this code:

body{
   height:100vh;
}

and that means that you are giving the body the full screen height

Comments