Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firefox - customize scroll bar

Tags:

css

i have the following code that customizes a webkit scroll bar....

/*webkit scroll bar*/  

::-webkit-scrollbar {
    width: 6px;
}


::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    -webkit-border-radius: 10px;
    border-radius: 10px;
}


::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(255,0,0); 
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}
::-webkit-scrollbar-thumb:window-inactive {
    background: rgba(255,0,0); 
}

what i would like to do is customize the scrollbar of a page loaded in firefox the same way... for which i tried the following code..

/*mozilla scroll bar*/  

::-moz-scrollbar {
    width: 6px;
}


::-moz-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    -webkit-border-radius: 10px;
    border-radius: 10px;
}


::-moz-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(255,0,0); 
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}
::-moz-scrollbar-thumb:window-inactive {
    background: rgba(255,0,0); 
}

but it does not work..... how can i customize the scrollbar in the same way i did for webkit... any help would be appreciated... thanks in advance... :)

like image 416
asdf Avatar asked Dec 07 '22 04:12

asdf


2 Answers

You can't because of bug #77790 (Link#1).

Bug 77790 - (scrollbar-colors) Style the scrollbar (binding ::-moz-horizontal-scrollbar to XBL)\

The only way is to use jQuery. I don't know how to code it, so don't ask me. I prepared the following links for jQuery scrollbars. Click here!(Link#2)

Links:

  • https://bugzilla.mozilla.org/show_bug.cgi?id=77790
  • http://plugins.jquery.com/custom-scrollbar/
like image 109
MineCMD Avatar answered Dec 08 '22 18:12

MineCMD


FireFox support these two:

  1. scrollbar-width : auto|thin|none...
  2. scrollbar-color
like image 42
Paresh Rajput Avatar answered Dec 08 '22 17:12

Paresh Rajput