change scrollbar colour (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


rapid -> change scrollbar colour (12/7/2004 13:54:41)

does anyone know a valid css way of changing the colour of scrollbars? i have an invalid way and a javascript way, but not a valid way.

thx




Donkey -> RE: change scrollbar colour (12/7/2004 14:00:34)

Welcome to the forum.

I'm afraid there is no valid way. When you change the scroll bar colour you are thought to be interfering with the browser window rather than your web site. Coloured scroll bars can also affect usability by the visually impaired.

Best to leave them grey.




bobby -> RE: change scrollbar colour (12/7/2004 14:07:08)

... or if you really want to change them, just use one of the methods you already have...

If it works, that's more important than whether or not it's "valid"

[;)]




c1sissy -> RE: change scrollbar colour (12/8/2004 10:29:46)

There is a way of doign this in css, but I"m not sure if it validates, and it only works in IE, so the rest of the browsers that visit your site, won't be able to see what you have done.




Donkey -> RE: change scrollbar colour (12/8/2004 10:35:02)

quote:

not sure if it validates
Definitely won't validate, but it also works in Opera (v7.23 tested 5 mins ago)




Giomanach -> RE: change scrollbar colour (12/8/2004 10:35:18)

It only works in IE - Not Valid =]





c1sissy -> RE: change scrollbar colour (12/8/2004 10:40:20)

wonder if you used a conditional statement if it would validate? Might be a way to get around it? but then on the other hand, if only one version of opera sees it and IE, its not worth it, IMO that is.




Xenon -> RE: change scrollbar colour (12/8/2004 14:46:24)

Insert this script into your webpage between the HEAD TAGS:

<style type="text/css">
<!--
BODY {
scrollbar-face-color: #FFAA00;
scrollbar-highlight-color: #FFCC00;
scrollbar-shadow-color: #FF9900;
scrollbar-3Dlight-color: #FFFF99;
scrollbar-arrow-color: #FFFFFF;
scrollbar-track-color: #FFFF66;
scrollbar-darkshadow-color: #FF8800;
}

//-->
</style>

Then change the colours (the weird codes after each attribute). You can go to any graphics program and see what the HTML code is for each colour.

Here you have an image showing each attribute: (if image is not shown properly visit: http://www.balearicus.com/scrollbars.jpg

[image]local://upfiles/9681/F286DB2442774938A47232DAD48C4B9B.jpg[/image]




jaybee -> RE: change scrollbar colour (12/9/2004 5:47:26)

As mentioned above, you can do it but it doesn't validate and it doesn't work in all browsers.




c1sissy -> RE: change scrollbar colour (12/11/2004 10:19:01)

Here is a chart that shows you exactly what is up with styling your scroll bars, its not recomended for any broswers but certain IE ones.

I believe that THIS should answer the original question in this thread

You can FIND MORE related to the rest of they scroll bar here at this link. I suggest that if you wish for your pages to work, you read this chart to see what browsers might crash if you use this on your page as styled with css.




Kitka -> RE: change scrollbar colour (12/11/2004 20:27:42)

Wow! Fabulous chart Deb, nice find. But ... how come Firefox isn't mentioned? [:o] [:(] It must surely be the second-most popular browser after IE now.




c1sissy -> RE: change scrollbar colour (12/11/2004 22:05:41)

Hi Kitka! How are you doing?

I'm sure you could email the owner of the site and ask them to add this.

I actually found this through a cssd mailing. I though it was great since it mentioned the scroll bars and what could happen if you use them. ITs also pretty good for the rest of the properties mentioned there as well [;)]




Kitka -> RE: change scrollbar colour (12/13/2004 0:04:28)

quote:

I'm sure you could email the owner of the site and ask them to add this


Good suggestion, I'll do that. [:)]




c1sissy -> RE: change scrollbar colour (12/13/2004 7:04:49)

Let us know how you make out with it. Most of the time they do respond if you email them.




jaybee -> RE: change scrollbar colour (12/13/2004 9:25:13)

quote:

email the owner of the site and ask them to add this


While you're at it, tell him his layout breaks in Firefox 1.

Maybe that's why he's not included the info. He never uses FF.




Kitka -> RE: change scrollbar colour (12/13/2004 9:31:29)

LOL jaybee! [:D] I noticed that too.

I've sent an email but haven't had a reply yet. I'll let you know what he says.

I didn't mention the broken layout, I'd rather like to keep him on the good side. [;)]




c1sissy -> RE: change scrollbar colour (12/14/2004 8:25:37)

quote:

I didn't mention the broken layout, I'd rather like to keep him on the good side

[:D] Good idea Kitka!




jeepless -> RE: change scrollbar colour (12/14/2004 19:28:10)

Point of clarification, please....

c1sissy:
quote:

I suggest that if you wish for your pages to work, you read this chart to see what browsers might crash if you use this on your page as styled with css.

I thought it was great since it mentioned the scroll bars and what could happen if you use them.

Am I hearing you right that colored scrollbars CAN actually crash some browsers??? It's been my understanding that browsers not supporting the scrollbar css properties (everything but IE 5.5+ and Opera 7+) would simply ignore them. At least that's what I've been led to believe. I'm troubled at the thought that I may have been crashing a few browsers and not knowing it. One of my clients insists on using them, but I'm sure he'd change his mind if he knew the consequences!




c1sissy -> RE: change scrollbar colour (12/14/2004 19:55:46)

If you go and look at the chart and click on the scroll bar things it gives you a list of what can happen, and crashing browsers is one of the things listed.

I did one in a homework page, just to try it out, but, I don't think I would mess with that much work for only one browser to have them on it. And if your client doesn't realize its not a cross browser thing, and that it won't validate, maybe they won't want to go with it? Could try to explain this and see what happens?

Let me know how you make out, and also research this online to see if you can find anything else on it. This is one persons view of what can happen. But, as far as other browsers, well, that has already been covered above so I wont' go into it.[;)]




jeepless -> RE: change scrollbar colour (12/15/2004 10:07:12)

quote:

If you go and look at the chart and click on the scroll bar things it gives you a list of what can happen, and crashing browsers is one of the things listed.

I dunno maybe I've had too much coffee this morning, but I'm not finding anything listed on that site when I click on the scrollbar properties that specifically relates to colored scrollbars crashing some browsers. Did I miss it? Perhaps "crashing browsers" was meant more of a general condition that could happen for SOME of the css properties he listed, but it didn't necessarily apply to coloring scrollbars?

I think his choice of words "Safe" and "Unsafe" was a bit too compelling.... I would have preferred that he use "Supported" and "Unsupported" since "Unsafe" implies a dangerous condition... and I still believe that colored scrollbars are NOT a dangerous condition. But as you said, his choice of words is "one person's view of what can happen". I also did a Google search and spent two hours looking through references for colored scrollbars and couldn't find anything that said it crashed browsers.... only that non-supporting browsers would ignore the scrollbar styles.

Interestingly enough, the author of that site ALSO uses colored scrollbars! I didn't see it yesterday since I used FF to view that page, but this morning I used IE6 and noticed the scrollbar styling. So if it truly "crashed browsers", I would think that he wouldn't use it on his css compatibility page!

Just one guy's opinion.....




c1sissy -> RE: change scrollbar colour (12/15/2004 15:47:25)

I know I read it as I was typing my response as I was reading the page, lol, maybe he changed it? Decided not to use those exact words?





Kitka -> RE: change scrollbar colour (12/19/2004 3:26:01)

quote:

I've sent an email but haven't had a reply yet. I'll let you know what he says.


Oops, sorry. I said I'd let you know...

My email came back 4 days after I sent it, with this error message:

quote:

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:
author@corecss.com
mailbox is full


I guess he is either away, or got tired of looking at web site email.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.1875