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,753
  • 72
  • 57
  • 129
Vetterjack
  • 2,227
  • 4
  • 19
  • 31

4 Answers4

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,977
  • 2
  • 20
  • 32
  • 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,383
  • 3
  • 19
  • 30
Harshith J Poojary
  • 316
  • 10
  • 26
0

.hideScrollbar::-webkit-scrollbar{
  display: none; 
 }
<div class='hideScrollbar'></div>
Dikshitkumar
  • 33
  • 1
  • 6
0

Just add the next css code

/* width */
::-webkit-scrollbar {
    width: 15px;
}

/* Track */
::-webkit-scrollbar-track {
    border-radius: 5px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

We hope this help

Desarrollalab
  • 337
  • 2
  • 5