To resolve the issue, try adding the overflow-y:scroll
property to your table
.
Ensure that shrinkToFit : false
is set or adjust your element as mentioned above.
<div style="width:100px;overflow:auto;"><table id="yourTable"></table><div>
You can achieve this using CSS.
yourTableSelector{
width:50%;
overflow-y:scroll;
}
Here's an illustration:
.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>