1

Firefox Webkit Scroll not working

.services::-webkit-scrollbar {
     width: 2px;
     height: 2px;
}

Note:- Please suggest some way to resolve this issue as soon as possible.

How to resolve this issue using JS/css??

tacoshy
  • 10,642
  • 5
  • 17
  • 34
Sunit
  • 61
  • 7

2 Answers2

3

Try this, it will definitely work

scroll-snap-type: mandatory;
scrollbar-width: none;
Sagar
  • 134
  • 8
1

Firefox IS NOT a WebKit browser... Therefore, a vendor prefix for Webkit browsers (Chrome, Edge, Safari) isn't going to have any effect on Firefox's rendering.

I highly recommend you add something like Autoprefixer to your build pipeline. It will manage adding prefixes where needed, not adding them in places where they're not needed (eg border-radius) and let you focus on writing standards-compliant CSS. (even though it won't help in this case where you're targeting vendor-specific selectors)

for reference Mozilla based browsers use the prefix -moz-

Bryce Howitson
  • 7,339
  • 18
  • 40
  • even though the answer is true, it ignores the most important fact: The `-moz-` prefex wont do anything here as Firefox has very limited support for scrollbar changes aswell as it doesnt need a prefix for that in the first place. – tacoshy May 26 '21 at 19:43
  • 1
    @tacoshy 100% agree, but you already pointed to good resources for scrollbars. I was hoping if the OP understood why the question was flawed, it would help them search for the correct answer. – Bryce Howitson May 26 '21 at 19:46