-4

I used ::-webkit-scrollbar CSS selector to reduce the width of the horizontal scroll bar as follow;

    ::-webkit-scrollbar
    {
        width: 2px;
        height: 2px;
    }
    ::-webkit-scrollbar-thumb 
    {
        background-color:black;
    }
<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
        <meta charset="utf-8">
        <title>Responsive Table</title>
        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
        <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
    </head>
  <body>
      <table class="table table-responsive" style="font-size:45px">
        <caption>This is a table</caption>
        <tr>
            <th>Subject</th>
            <th>GPA</th>
            <th>Subject</th>
            <th>GPA</th>
            <th>Subject</th>
            <th>GPA</th>
            <th>Subject</th>
            <th>GPA</th>
            <th>Subject</th>
            <th>GPA</th>
            <th>Subject</th>
            <th>GPA</th>
        </tr>
      </table>
  </body>
</html>

Its working fine with chrome but its not working for IE. I tried using ms along with webkit but still no improvement!

Zeeshan Ahmad Khalil
  • 793
  • 1
  • 12
  • 29
Hina Ahmad
  • 1
  • 1
  • 4

2 Answers2

4

There is no support in IE/Edge.

enter image description here

Andy Hoffman
  • 18,436
  • 4
  • 42
  • 61
0

Unfortunately there's no native support, but you could try a custom js or jquery plugin?. Here are a few: jQuery Scrollbar, perfect-scrollbar, slimScroll or NiceScroll.

coops
  • 1,678
  • 1
  • 13
  • 26