6

After some researches I found out that I have to set the tbody of a table

display: block;
overflow: auto;

to enable scrolling on a html table.

Is there a possibility to hide the scrollbar generic on every modern browser (Chrome, Safari, Firefox)? I tried some solutions like this one but it doesn't work on a table.

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
Vetterjack
  • 1,919
  • 4
  • 16
  • 27

3 Answers3

5

Use overflow: hidden; to hide the content outside of the container, or overflow: visible; to display it even if it's going outside of the container borders. Both remove the scrollbar.

Rokin
  • 1,697
  • 2
  • 23
  • 30
  • Or maybe you want something like this: http://stackoverflow.com/questions/16670931/hide-scroll-bar-but-still-being-able-to-scroll ? – Rokin Apr 13 '15 at 13:51
1

You can remove scrollbar easily by using the following CSS class:

.overflow-hidden {
    overflow: hidden;
}

If you are using Bootstrap just use overflow functionality. Find docs here

<div class="overflow-hidden">...</div>
Ezekiel
  • 2,253
  • 3
  • 17
  • 27
Harshith VA
  • 98
  • 6
  • 19
0

.hideScrollbar::-webkit-scrollbar{
  display: none; 
 }
<div class='hideScrollbar'></div>