0

I include my table inside a div to have overflow: scroll. However, it is also inserting a scrolling in horizontal. I just want the scrolling bar in vertical.

<div style="height: 700px !important; width: 100%; overflow: scroll;">
    <table class="table table-bordered">
        <!-- Content Here -->
    </table>
</div>
Max Boy
  • 317
  • 6
  • 21
  • use `overflow-y:` property, look up CSS3. And don't double questions. – PStarczewski Jul 26 '18 at 19:44
  • 2
    Possible duplicate of [HTML: How to create a DIV with only vertical scroll-bars for long paragraphs?](https://stackoverflow.com/questions/2566290/html-how-to-create-a-div-with-only-vertical-scroll-bars-for-long-paragraphs) – PStarczewski Jul 26 '18 at 19:45

2 Answers2

1

The overflow-y property specifies whether to clip the content, add a scroll bar, or display overflow content of a block-level element, when it overflows at the top and bottom edges.

<div style="height: 700px !important; width: 100%; overflow-y: scroll;">
    <table class="table table-bordered">
        <!-- Content Here -->
    </table>
</div>
0

You could use overflow-y: scroll; or overflow-y:auto; property

The overflow-y property specifies whether to clip the content, add a scroll bar, or display overflow content of a block-level element, when it overflows at the top and bottom edges.

https://www.w3schools.com/CSSref/css3_pr_overflow-y.asp