Sunit
Sunit

Reputation: 61

::-webkit-scrollbar not working on firefox

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??

Upvotes: 1

Views: 1128

Answers (3)

Moenul Islam
Moenul Islam

Reputation: 3

/// For Firefox ///

.section{
   scrollbar-width: thin;
   scrollbar-color: #838383 transparent;
}

/// For Chrome ///

.section_bar::-webkit-scrollbar {
    width: 10px;
}

Upvotes: 0

Sagar
Sagar

Reputation: 134

Try this, it will definitely work

scroll-snap-type: mandatory;
scrollbar-width: none;

Upvotes: 3

Bryce Howitson
Bryce Howitson

Reputation: 7690

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-

Upvotes: 1

Related Questions