Submit Your Article Forum Rules

Results 1 to 6 of 6

Thread: Color Scrollbar

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Posts
    115

    Color Scrollbar

    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
    Darren Darkins

  2. #2
    Senior Member httpman's Avatar
    Join Date
    Aug 2003
    Posts
    121
    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
    www.net-createurs.com [ french only website sorry ! ]

  3. #3
    Senior Member
    Join Date
    Jan 2004
    Posts
    115

    nice one

    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
    Darren Darkins

  4. #4
    Senior Member httpman's Avatar
    Join Date
    Aug 2003
    Posts
    121
    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
    www.net-createurs.com [ french only website sorry ! ]

  5. #5
    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.

  6. #6
    Senior Member ranjan's Avatar
    Join Date
    Sep 2003
    Posts
    152

    Change the CSS

    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
    ranjan | Macromedia Certified Dreamweaver MX Developer
    http://www.dreamlettes.net - a dreamweaver resource
    http://www.ranjan.ws - got blog?
    http://www.total-impact.com - a web design community

Similar Threads

  1. Annoying scrollbar in FF and NSN
    By dharrison in forum Graphics & Design Discussion Forum
    Replies: 6
    Last Post: 12-02-2007, 03:48 PM
  2. changing the scrollbar size
    By Jabber_uk in forum Graphics & Design Discussion Forum
    Replies: 13
    Last Post: 06-07-2006, 04:11 AM
  3. Colour in scrollbar
    By souvik das in forum Graphics & Design Discussion Forum
    Replies: 6
    Last Post: 02-22-2005, 11:05 PM
  4. scrollbar
    By kermit in forum Flash Discussion Forum
    Replies: 2
    Last Post: 10-22-2003, 02:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •