используйте overflow-y:scroll
в вашем table
, который должен позаботиться об этом.
Установите shrinkToFit : false
или настройте свой элемент на вышеуказанный способ.
<div style="width:100px;overflow:auto;"><table id="yourTable"></table><div>
Вы можете используйте для этого CSS.
yourTableSelector{
width:50%;
overflow-y:scroll;
}
Пример:
.scrolling-wrapper {
height:100px;
width:50%;
border:1px solid red;
overflow-y: scroll;
}
<div class="scrolling-wrapper">
<div>There are two different ways to make these divs scroll horizontally and which path you choose will probably come down to personal preference and/or browser support.
There are two different ways to make these divs scroll horizontally and which path you choose will probably come down to personal preference and/or browser support.
There are two different ways to make these divs scroll horizontally and which path you choose will probably come down to personal preference and/or browser support.</div>
</div>