Email conversation
From | Brighid Flaherty |
To | Me |
Subject | COLORED SCROLLBARS IN DIVS!!! |
Date | 12 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
From | Me |
To | Brighid Flaherty |
Subject | Re: COLORED SCROLLBARS IN DIVS!!! |
Date | 12 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/