IE/Opera Scrollbars
By Paul
5/5 based on 1 vote. The median rating is 5.
By Paul
To use colored scrollbars for IE 5.5+ and Opera, add this at the top of your stylesheet:
html
{
scrollbar-base-color: #D8DADC;
scrollbar-arrow-color: #000000;
}
Change those hexadecimal color values to the colors you want your scrollbars to have.
You must also remove the DTD delaration at the top of the wrapper template. The DTD kills the scrollbars because they don't comply with it; hence you must make a choice between either strict standards compliance or colored scrollbars.
From pablo's forum post:
"The scrollbar tweaks are not officially supported by css, they're more of a hack that work in ie and I suppose some other browsers. To get it to work you should remove the DOCTYPE declaration from your head tag. for example, remove:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> , or whatever yours specifically is. That should make the scroll bar colours change to whatever you defined in your stylesheets.
Actually, if you just remove the URL portion in the above example, I think that is enough, because that is where the browser looks to find the rules that apply to your page -- and it finds no rules defining scrollbar colours and has no idea what your scrollbar-related styles mean -- so it ignores them.
i.e. you would keep only:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
But as I said, scrollbar colour changes are a hack to css, so if you are one of those validation nazis and would have a stroke if your web pages did not have a document type declaration, then you'll have to live without coloured-scrollbars "
html
{
scrollbar-base-color: #D8DADC;
scrollbar-arrow-color: #000000;
}
Change those hexadecimal color values to the colors you want your scrollbars to have.
You must also remove the DTD delaration at the top of the wrapper template. The DTD kills the scrollbars because they don't comply with it; hence you must make a choice between either strict standards compliance or colored scrollbars.
From pablo's forum post:
"The scrollbar tweaks are not officially supported by css, they're more of a hack that work in ie and I suppose some other browsers. To get it to work you should remove the DOCTYPE declaration from your head tag. for example, remove:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> , or whatever yours specifically is. That should make the scroll bar colours change to whatever you defined in your stylesheets.
Actually, if you just remove the URL portion in the above example, I think that is enough, because that is where the browser looks to find the rules that apply to your page -- and it finds no rules defining scrollbar colours and has no idea what your scrollbar-related styles mean -- so it ignores them.
i.e. you would keep only:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
But as I said, scrollbar colour changes are a hack to css, so if you are one of those validation nazis and would have a stroke if your web pages did not have a document type declaration, then you'll have to live without coloured-scrollbars "
Rating:
5/5 based on 1 vote. The median rating is 5.
Submitted: 03/14/04 (Edited 11/06/06)
Description: A note on getting IE/Opera scrollbar customized colors to work.
Views:
1174 views. Averaging 1 per day.
In the most recent 30 day period, there've been 3 views.

Print
E-Mail