Navigation
Poll
Would you be an active poster if Ron's Guide had a message board?


Total Votes: 62
Comments: 18 — View
Past pollsPoll idea?
Rate Ron's Guide
Rate our resource at Bigwebmaster.com
Custom Scrollbars
In this tutorial you'll learn how to customize your browser's scrollbar colors in Microsoft Internet Explorer.

Have you ever wondered how you get the scrollbar colors to change? Well, it's easy to do with CSS.

It can be done with the scrollbar properties in CSS. Note, though, that only Microsoft Internet Explorer supports these properties. There are eight scrollbar properties:

  1. Base color
  2. Arrow color
  3. Face color
  4. Track color
  5. Shadow color
  6. Highlight color
  7. Darkshadow color
  8. 3dlight color

Ok, great, so what do these properties represent? Have a look at the image below...

To use these properties, all you have to do is put them into the body selector of a stylesheet. An example is shown below.

<style type="text/css">
body {
    scrollbar-base-color: #000000;
    scrollbar-arrow-color: #6394BD;
    scrollbar-face-color: #F0F2F4;
    scrollbar-track-color: #F8F8F8; 
    scrollbar-shadow-color: #DCE0E2;
    scrollbar-highlight-color: #FFFFFF;
    scrollbar-darkshadow-color: #474271;
    scrollbar-3dlight-color: #96AABD; 
}
</style>

Go ahead and try it, play around with the different settings. Smile

Discuss Tutorial: Custom Scrollbars 13 Comments
Comment by Ron on Mar 16, 2004, 4:31 am
Please post questions or comments about this tutorial below. Smile
Comment by firefox_user on Dec 13, 2004, 11:49 am
Sad custom scrollbars does not work with firefox (mozilla) browsers.
Comment by Ron on Dec 14, 2004, 1:24 am
Right, the CSS properties that allow scrollbars to be customized were created by Microsoft, therefore they are only available in Internet Explorer browsers.
Comment by James on Jan 3, 2005, 10:31 pm
And AOL Browsers.


- James
Comment by Ron on Jan 3, 2005, 11:49 pm
Yep, It'll work in any browser that uses the IE rendering engine.
Comment by Kevin on Jan 6, 2005, 9:01 pm
Very nice Ron Smile
Comment by Sik on Jan 8, 2005, 4:37 pm
Nice
Comment by Gabriel on Jul 7, 2005, 1:22 am
nice tut Wink
just for IE!!! fuck it!!
FIREFOX IS THE BEST.

thx!!!
Comment by itchy monkey on Jul 28, 2005, 1:31 pm
Sad
what am i doing wrong?! I use a pc with the latest IE browser but this code isn't working! Its in a css file linked to my web pages and i've tried actually putting it directly into my html pages - but no joy!

please help - could it be an IE setting?!
Comment by Tom on Aug 23, 2005, 10:33 am
Wassat
As itchy monkey has said, I put the code directly into my html page, but the code doesn't work, the only time I've gotten it to work is by changing the 'body {' to 'html {' but then this screws up the code view in Dreamweaver, changes all colour coding to pink. Sad

« Previous [ 1 2 ] Next »
Post a comment
Sorry, you must be a registered member to post comments.

If you would like to register, you can do so here.
If you already have an account, please login.