Collected by
Elizabeth Janson

Home Page

Coloured Sidebars

  CNET provide a section called 'Stupid Web Tricks'
with a routine for
Fabulous tropical scroll bars for IE 5.5
By Holly Cunningham
(2/23/01)
She writes

Put this code in the <HEAD> of your page:

<STYLE type="text/css"><!--
BODY {
 scrollbar-base-color: color;
 scrollbar-track-color: color;
 scrollbar-face-color: color;
 scrollbar-highlight-color: color;
 scrollbar-3dlight-color: color;
 scrollbar-darkshadow-color: color;
 scrollbar-shadow-color: color;
 scrollbar-arrow-color: color;
 }
--></STYLE>

Scroll bar color anatomy

For each of these properties, replace color with the color name or hex code that you want to use. To the right is an exaggerated diagram of scroll bar color anatomy. The face property fills the arrow buttons and scroll tab. The highlight and shadow properties color their inner edges, while 3dlight and darkshadow color their outer edges. Use arrow to color the arrow buttons' triangles and track for the rest of the scroll bar. If track isn't specified, highlight also colors the mesh pattern in the track area; otherwise the track is monotone. Finally, base fills in track, face, and 3dlight all at once; setting any of them overrides it.


BUT this sidebar is different

"OK," you're saying to yourself, "is that all there is to a scroll bar?" That's up to you. You can add script to these styles if subtlety is not your thing; IE 5.5 users will notice the Java Script that we used to make this page's scroll bar change colors. The oddly named TriState Rainbow ScrollBar Script by etLux is another example. Or you can take the quiet approach, such as making the track color blend with the page background for a more seamless look or matching everything out to be invisible--save for the arrows.

But before you put on your "CSS Died for My Sins" T-shirt, be aware that so far only Internet Explorer 5.5 supports these CSS properties, which are unashamedly proprietary.


References

Holly Cunningham, a frequent contributor to CNET Builder.com, is a freelance Web designer who works primarily to keep her Chihuahua in furs.

IE 5.5 and colored scroll bars

Buzz members discuss a straightforward question after the obligatory derision.
In Builder Buzz
More Stupid Web Tricks
From CNET Web Building
Scroll bar color properties
From MSDN
CSS attributes reference
From MSDN
Scroll bar color script (German)
From Dauerstress

 

Added to make the page long.

CSS1 assumes a simple box-oriented formatting model where 
each formatted element results in one or more rectangular boxes. 
(Elements that have a 'display' value
of 'none' are not formatted and will therefore not result in a box.)
All boxes have a core content area with optional surrounding padding,
border and margin areas.
 _______________________________________
|                                       |
|           margin (transparent)        |
|   _________________________________   |
|  |                                 |  |
|  |        border                   |  |
|  |   ___________________________   |  |
|  |  |                           |  |  |
|  |  |     padding               |  |  |
|  |  |   _____________________   |  |  |
|  |  |  |                     |  |  |  |
|  |  |  |  content            |  |  |  |
|  |  |  |_____________________|  |  |  |
|  |  |___________________________|  |  |
|  |_________________________________|  |
|_______________________________________|

          |    element width    |
|               box width               |


                           ------------- <-- top
                            top margin
                           -------------
                            top border
                           -------------
                           top padding
                           +-----------+ <-- inner top
|        |        |        |           |         |         |         |
|--left--|--left--|--left--|- content -|--right--|--right--|--right--|
| margin | border | padding|           | padding | border  | margin  |
|        |        |        |           |         |         |         |
                           +-----------+ <-- inner bottom
A                          B           C                             D

                 	    bottom padding                       
                           -------------                
                             bottom border
                           -------------
                             bottom margin
                           ------------- <-- bottom
A - right inner edge    B - left inner edge   
                           C - right inner edge  D - right outer edge

Back to left-side panels, or on to Clashing with Browsers

Email
CSS begins here
Back to side-bar colours or on to clashing with browsers.

This page is part of Elizabeth Janson's web site

http://www.oocities.org/elizatk/index.html

My other sites are the Anglican Parish of Northern Mallee,
Tetbury residents in the Eighteenth Century
my Australian Family History and Barrie, our Family Poet.