1

I was trying to hide scrollbar in for specific ul but wanted to allow horizontal scrolling and I tried below

.ul::-webkit-scrollbar {
   display:none
}

it worked for all the browsers and devices except safari and iOS respectively

Laura
  • 8,100
  • 4
  • 40
  • 50
  • 2
    Possible duplicate of [Hiding scrollbars via css doesn't work in Safari, how to fix it?](https://stackoverflow.com/questions/47346527/hiding-scrollbars-via-css-doesnt-work-in-safari-how-to-fix-it) – Laura Nov 01 '18 at 13:42
  • 1
    this doesn't work! – ronak barbhaya Nov 02 '18 at 12:16

1 Answers1

0

I've found a work around :

  .my-element::-webkit-scrollbar {
    display: none;
    width: 0 !important;
    height: 0 !important;
    -webkit-appearance: none;
    background: transparent; // HERE IS THE TRICK
  }
Stefdelec
  • 2,711
  • 3
  • 33
  • 40