Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the color of scrollbars

I want to change the color of the scrollbars on my pages in Internet Explorer and Firefox.

This code creates scrollbars:

<div style="overflow: auto; width: 750px; height: 400px">   
</div>

To change their color, I tried this code:

<STYLE TYPE="text/css">

BODY
{
scrollbar-base-color: orange;
scrollbar-arrow-color: green;
scrollbar-DarkShadow-Color: blue;
}
</STYLE>

The above code is in my header, but it didn't change the scrollbars' color.

Can anyone help me?

like image 573
Gopal Avatar asked Jan 04 '10 05:01

Gopal


1 Answers

Just as others said, the CSS you posted won't work on modern browsers (IE8, Safari, Firefox, etc). Since you're trying to scroll a div, you do, however, have the option of making a custom scrollbar in Javascript/DHTML. A quick Google search reveals a few have done just that like this one: http://www.hesido.com/web.php?page=customscrollbar

like image 79
Newtang Avatar answered Oct 28 '22 21:10

Newtang