PDA

View Full Version : Color Scrollbar



DarrenPWS
01-21-2004, 05:55 PM
Hi everyone,
I am intending to apply a coloured scroll-bar to a website I am working on for a client.

Instead of adding the code in the <head> section, I want to put it into a CSS so that I don't have to go through the 25 pages I have already created applying the code, and then go through them all again if my client wants a different colour etc. etc.

The problem I am having is when I put the code into my style sheet, it has no affect what so ever on the webpage. I am viewing it in IE6 - so it's not a browser problem. It worked the other day too - I am sooo frustrated and confused, please help !!

I use the following code :


body {code in here}


I am 100% sure that the code is correct because it works in the <head> section, so it must be something I haven't done correctly using the css ?? ?? ??

Thanks a lot in advance,
Darren Darkins

httpman
01-21-2004, 06:04 PM
Hello Darren

The CSS is the right way !!
Here is an extract of the code I use on my own website (and on most of my clients websites):

body {
scrollbar-arrow-color:#3791BF;
scrollbar-track-color:#E3EEF9;
scrollbar-3dlight-color:#D1D7DC;
scrollbar-darkshadow-color:#98AAB1;
scrollbar-base-color:#000000;
scrollbar-highlight-color:#8AB5DA;
scrollbar-face-color:#C5E6F5;
scrollbar-shadow-color:#8AB5DA;
}

This works fine on any version of IE from 5.0. To use it, you must have into your <head> section the following line :

<link href="your_css_relative_address.css" rel="stylesheet" type="text/css">

It works ! So if it still doesn't work on your own site please give me the URL and I will check.

JP

DarrenPWS
01-21-2004, 06:47 PM
Hi httpman,

Well, although I thought I was doing it right, something must have been wrong with my code, in copy&pasting your code, and modifying the colours to match the site I am doing, it now works!

Whatever you done, it was right and I have decided not to turn to drink...

Thanks,

DD

httpman
01-21-2004, 08:25 PM
Great, that's the magic with the www world.
Just add / change / replace a . or a , and it can maybe work, or maybe not. Great magic !

I personnally decided to continue drinking, but only beers and only during the day - during the night I work for my clients, and try to make nice things. Seems to work !

Checked at your www link at the bottom of your posts, did you build that site ? It's really good. That "close" link on the upper right : wonderfull. I keep the idea for later.

Jean-Pierre

starrwriter
01-22-2004, 02:48 AM
Two tips about using colored scrollbars:

(1) You must list the scrollbar elements in the correct order.

(2) The colored scrollbars won't appear in IE 6 if you use a DOCTYPE that demands strict WWW3 code compliance. I delete the DOCTYPE, which kicks IE 6 into "quirks" (non-compliant) mode and makes the colored scrollbars display.

ranjan
01-23-2004, 08:47 AM
Why delete the DOCTYPE and push your document into quirks mode? Change the CSS instead...

http://dreamlettes.net/extensions/scrollbars.htm

The scrollbars is the page above appear in IE altough the DOCTYPE is present because the scrollbar properties are specified on "html" rather than on "body"

Also using IE conditional statements the scrollbars CSS are hidden from other browsers and CSS Validator, so they validate the document

If you use dreamweaver you can get the extension

http://dreamlettes.net/extensions/#Scrollbars