Click here to Skip to main content
14,390,256 members
Rate this:
Please Sign up or sign in to vote.
Hello everyone,

I want to resize my Mozilla browser Scrollbar width in my site. But I cannot get success ...

Can anybody help me for this ...

Thank you in advance

What I have tried:

::-moz-scrollbar { width: 15px; }
Posted
Updated 27-Apr-16 3:52am
Rate this:
Please Sign up or sign in to vote.

Solution 1

You can't style the scrollbars in Firefox with CSS. People have been asking for this since Firefox was first released, but it's still not available:
77790 – (scrollbar-colors) Style the scrollbar (binding ::-moz-horizontal-scrollbar to XBL)[^]

The only way to get a custom scrollbar is to completely replace the scrollbar via Javascript. There are various plugins to do this - for example:
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

scrollbar-width - CSS: Cascading Style Sheets | MDN[^]

The scrollbar-width property allows the author to set the maximum thickness of an element’s scrollbars when they are shown.

scrollbar-width: none;
scrollbar-width: thin;
scrollbar-width: auto;
   
Comments
OriginalGriff 5-Nov-19 4:01am
   
While I applaud your urge to help people, it's a good idea to stick to new questions, rather than 3 year old ones. After that amount of time, it's unlikely that the original poster is at all interested in the problem any more! And ... "Experimental", "Check the Browser compatibility table carefully before using this in production" ... maybe not the best solution. :laugh:

Answering old questions can be seen as rep-point hunting, which is a form of site abuse. The more trigger happy amongst us will start the process of banning you from the site if you aren't careful. Stick to new questions and you'll be fine.
Richard Deeming 5-Nov-19 15:13pm
   
Support for that property was added in Firefox 64, which was released in December 2018 - about 2½ years too late for the OP's project! :)

It's not a standard property, and it's in danger of being dropped[^], so it may not even work in Firefox for much longer.

Can I use... Support tables for HTML5, CSS3, etc[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100