...

View Full Version : CSS scroll bar colors in IE not working...



chump2877
03-22-2005, 02:43 PM
I have this code in my CSS file to give the scroll bars a color in IE:


body
{
background-image:url(gradient_back_main.jpg);
background-color:#D1C9BE;
background-repeat:repeat-x;
margin-top:0;
scrollbar-arrow-color:ffffff;
scrollbar-track-color:8F887B;
scrollbar-shadow-color:8F887B;
scrollbar-face-color:8F887B;
scrollbar-highlight-color:ffffff;
scrollbar-darkshadow-color:cccccc;
scrollbar-3dlight-color:8F887B;
}

But, it's not working......Can anyone give me some possible reasons why this code would not produce the desired results (scroll bar colors in IE)....if it helps, my doctype is HTML Transitional 4.01....

Thanks.

ronaldb66
03-22-2005, 02:51 PM
It would probably help if you would place a hash mark (#) in front of all the color values, so "scrollbar-arrow-color:#ffffff;" instead of "scrollbar-arrow-color:ffffff;", etc.

mark87
03-22-2005, 02:55 PM
From past experience I've learnt that you cannot have coloured scrollbars with the HTML 4.01 Transitional Doctype - I'm not sure if all other doctypes prevent them too, but they are not really valid according to the w3 anyway.

ronaldb66
03-22-2005, 03:06 PM
not really valid according to the w3

Correct; they're strictly IE and therefore not valid according to any CSS standard.
This has nothing to do with the HTML version though, I expect, unless the chosen rendering mode has some influence. I don't expect MS however to kill their own little toy in any rendering mode in IE.

chump2877
03-22-2005, 03:19 PM
The hash marks were an oversight, thank you....

But I added them, and the CSS still isn't working right....

Could it have anything to do with the fact that the CCS is working inside a file with the extension .shtml and the fact that I'm testing the page offline?

_Aerospace_Eng_
03-22-2005, 05:02 PM
it has to go in the html element

html {
scrollbar-arrow-color:#FFFFFF;
scrollbar-track-color:#8F887B;
scrollbar-shadow-color:#8F887B;
scrollbar-face-color:#8F887B;
scrollbar-highlight-color:#FFFFFF;
scrollbar-darkshadow-color:#CCCCCC;
scrollbar-3dlight-color:#8F887B;
}
body
{
background-image:url(gradient_back_main.jpg);
background-color:#D1C9BE;
background-repeat:repeat-x;
margin-top:0;
}

chilipie
03-22-2005, 05:11 PM
Please, please, please search the forums before asking a question - this particular problem has been encounted many times before, and I have personally provided the answer to more topics than I can count (mind you, I can't count very well :D ).

chump2877
03-22-2005, 05:12 PM
sweet, thanks....that did it :thumbsup:


Edit:


Please, please, please search the forums before asking a question - this particular problem has been encounted many times before, and I have personally provided the answer to more topics than I can count (mind you, I can't count very well ).

Duh, oops...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum