Dimitri Vorontzov Dimitri Vorontzov - 1 month ago 11
CSS Question

Custom CSS Scrollbar for Firefox

I want to custom-style a scrollbar with CSS.

I use this WebKit CSS code, which works well for Safari and Chrome:

::-webkit-scrollbar {
width: 15px;
height: 15px;

::-webkit-scrollbar-track-piece {
background-color: #C2D2E4;

::-webkit-scrollbar-thumb:vertical {
height: 30px;
background-color: #0A4C95;

How can I do the same thing for Firefox?

(I know I can easily do it using jQuery, but I would prefer to do it with CSS if it's doable.)

Would be grateful for somebody's expert advice!


There's no Firefox (Gecko) equivalent to ::-webkit-scrollbar and friends.

You'll have to stick with jQuery.

Plenty of people would like this feature, see: https://bugzilla.mozilla.org/show_bug.cgi?id=77790

This report is asking for the exact same thing you're asking for: https://bugzilla.mozilla.org/show_bug.cgi?id=547260

It was closed as a duplicate of the first report I linked to.