Click to See Complete Forum and Search --> : How to change color of browser's scrollbars


GUIR
10-23-2004, 07:27 AM
I have seen in some websites, the color of Scrollbars are changed to other than the system default.

Now, I am wondering how to do it with my website.Please someone let me know how to do such.Also, much better if solutions are available for scrollbars of text areas, list boxes.

Regards

DaveSW
10-23-2004, 07:39 AM
We do not reccomend that you change the users browser in any way, for a number of reasons including accessibility, the fact that this code is IE only, and a whole host of other reasons I can't remember right now.

but if you really want to do it you can find info here: http://www.cmg02.com/scripts2/scrollbarwizard.htm

:)

the tree
10-23-2004, 08:12 AM
It's outstandingly easy to do for IE but all other browsers don't accept it. Besides, I don't like sites that make me scroll that much anyway.

PeOfEo
10-23-2004, 08:31 AM
Colored scoll bars can be very bad when they change the contrast between the bar and the track, or the buttons and the bar. It can ick off users when they can't see the bar.

GUIR
10-23-2004, 08:37 AM
Thanx U2 above, for your help.

I wanted to match the Scrollbars colors to the colors used in my webpages.

I'll try on those.

Regards

Ribeyed
10-23-2004, 08:39 AM
Hi,
put this code in a style tag:


BODY { scrollbar-3d-light-color:#005899;
scrollbar-arrow-color:#cccccc;
scrollbar-base-color:#005899;
scrollbar-dark-shadow-color:#e5f4ff;
scrollbar-face-color:#003a66;
scrollbar-highlight-color:#cccccc;
scrollbar-shadow-color:#0075cc
}

Hope this helps :D

DaveSW
10-23-2004, 10:19 AM
Originally posted by the tree
It's outstandingly easy to do for IE but all other browsers don't accept it.

Thats because it's M$ proprietary code that isn't in the standards @ www.w3.org.

It's the principle that annoys me most. So you can change my scrollbar color (well, actually you can't coz I'm using moz, but that aside), then in the same principle would you want people changing your background on your desktop? answer probably no.

the tree
10-23-2004, 10:37 AM
Originally posted by Ribeyed Hi,
put this code in a style tag: Me, Dave and Peofeo already knew that code, yet we didn't post it because we didn't want to encourage anyone to use it. If you'd read the thread you'd know why.

Fang
10-23-2004, 10:47 AM
Using xhtml DTD (http://www.webdeveloper.com/forum/showthread.php?s=&threadid=26222&highlight=scrollbar)?

Ribeyed
10-24-2004, 01:12 AM
HI,

yet we didn't post it because we didn't want to encourage anyone to use it.


He asked the question so i answered it!
Since when did you start deciding what information i choose to give someone?

GUIR
10-26-2004, 11:00 AM
ThanX Ribeyed for your support.

Also, I thank others i this thread about their advices.

Now I do understand, the scrollbars of the browser are property of the end user, not the web developers. Its not fair enough to play with it.

However I think theres no problem, with changing colors of scrolls of form controles, such as text area, list boxes, ....

I'd like to know about them.

Regards

DaveSW
10-26-2004, 11:03 AM
most of them are controlled in the same way, but I think there may be one or two that don't handle it.
What you need to do is put the element name in with body. e.g.

body, textarea { scrollbar-3d-light-color:#005899;
scrollbar-arrow-color:#cccccc;
scrollbar-base-color:#005899;
scrollbar-dark-shadow-color:#e5f4ff;
scrollbar-face-color:#003a66;
scrollbar-highlight-color:#cccccc;
scrollbar-shadow-color:#0075cc
}

and then put a comma followed by any other element you can think of.

GUIR
10-27-2004, 07:59 AM
The Code is fine.

ThanX 4ur Help.

Regards

DaveSW
10-27-2004, 10:41 AM
np :)