By Paul Knierim (WSN PHP Scripts)
03/14/04 (Edited 11/06/06)
To use colored scrollbars for IE 5.5+ and Opera, add this at the top of your stylesheet:
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 "
5/5 based on 1 votes. The median rating is 5.
Views: 1404 views. Averaging 0 views per day.