Is it possible? (CSS)

  • Thread starter Shannon
  • 9 comments
  • 736 views
15,799
Here is a simple CSS code that you put in between the <head> and </head> tags in your source code to change the colour of the IE scrollbar:

Code:
<style>

<!--
body {
scrollbar-face-color: #xxxxxx;
scrollbar-shadow-color: #xxxxxx;
scrollbar-highlight-color: #xxxxxx;
scrollbar-3dlight-color: #xxxxxx;
scrollbar-darkshadow-color: #xxxxxx;
scrollbar-track-color: #xxxxxx;
scrollbar-arrow-color: #xxxxxx;
}
-->

</style>

One thing has got me stumped though. I've been trying to put this code into an external CSS style sheet, so then I can just link to the style sheet instead of having to edit each scrollbar seperately. I've tried, and tried and tried with no luck. Alas, I come to GTP for help.

First of all, is it possible to put this in an external style sheet and if so, how may I go about doing this?
 
Originally posted by GilesGuthrie
Um. I don't see why not. Why don't you manually edit the CSS file?
I have, but I can't get it to work. And, if I put it in an external sheet, I'd need to use a class to activate the CSS.
 
Oh, OK. Fair enough. Since the scrollbar control is (or was) IE-only, I haven't bothered with it.
 
Here's what I have for my CSS:

HEAD
{
cursor: crosshair;
}
BODY
{
scrollbar-base-color: #1B0CAA;
scrollbar-arrow-color: #80FFFF;
background : #7F0000;
color : #FFFFFF;
cursor: crosshair;
}
A{
color: #FFFFFF;
}

That's in a separate file, but it should work. For loading my CSS file, I have this in the HEAD section:
<link rel="stylesheet" href="css/css1.css"></style>
 
Originally posted by Shannon
Here is a simple CSS code that you put in between the <head> and </head> tags in your source code to change the colour of the IE scrollbar:

Code:
<style>

<!--
body {
scrollbar-face-color: #xxxxxx;
scrollbar-shadow-color: #xxxxxx;
scrollbar-highlight-color: #xxxxxx;
scrollbar-3dlight-color: #xxxxxx;
scrollbar-darkshadow-color: #xxxxxx;
scrollbar-track-color: #xxxxxx;
scrollbar-arrow-color: #xxxxxx;
}
-->

</style>

One thing has got me stumped though. I've been trying to put this code into an external CSS style sheet, so then I can just link to the style sheet instead of having to edit each scrollbar seperately. I've tried, and tried and tried with no luck. Alas, I come to GTP for help.

First of all, is it possible to put this in an external style sheet and if so, how may I go about doing this?


in order to use this in an external style sheet you'll have to put it within a class such as:

.window {scrollbar-face-color: #xxxxxx;
scrollbar-shadow-color: #xxxxxx;
scrollbar-highlight-color: #xxxxxx;
scrollbar-3dlight-color: #xxxxxx;
scrollbar-darkshadow-color: #xxxxxx;
scrollbar-track-color: #xxxxxx;
scrollbar-arrow-color: #xxxxxx;
}

then refer to it in your html when you want to use it as follows:

<tag class="window">
 
Back