Brighid Flaherty

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromBrighid Flaherty
ToMe
SubjectCOLORED SCROLLBARS IN DIVS!!!
Date12 September 2004 01:04
Hi. I was wondering if you know how to make my div scrollbars different
colours. I've looked and looked, but nothing ever tells me where to put the
html codes. if you want to check out my website and see the three text
boxes I want to colour, the url is http://xxxxxxxxx.xxx/xxxxxxxxxxxxxx
Any instruction you can give would be greatly appreciated.
Thankyou.
~Copper
FromMe
ToBrighid Flaherty
SubjectRe: COLORED SCROLLBARS IN DIVS!!!
Date12 September 2004 10:47
Assuming you have used CSS, this should be fairly easy.

Within the head of the document, you would put this:

<style type="text/css"><!--
#styleThis {
    height: 200px; /* you need to give it a height */
    overflow: auto; /* this makes it use a scrollbar */
    scrollbar-3dlight-color: #dfdfdf;
    scrollbar-highlight-color: #ffffff;
    scrollbar-face-color: #c0c0c0;
    scrollbar-arrow-color: #000000;
    scrollbar-shadow-color: #808080;
    scrollbar-darkshadow-color: #000000;
    scrollbar-track-color: #eeeeee;
}
--></style>

Then make sure your div uses the ID that you used in the stylesheet above:
<div id="styleThis"> ... </div>

Alternatively (and this is the only way to style just this one scrollbar if
you want it to also work in Opera):

<div style="
scrollbar-3dlight-color: #dfdfdf;
scrollbar-highlight-color: #ffffff;
... etc ...
"> ... </div>

I have described which parts of the scrollbars each of these refer to on
http://www.howtocreate.co.uk/tutorials/scrlbar.html
And I have also described how the colour codes work on
http://www.howtocreate.co.uk/tutorials/css/colours


Hope this is useful

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.