tkoi
Utahraptor!
+148|6427|Texas
Hi there. I've come to a little snag whilst working on a css file for my Firefox theme (which, btw has a thread here). I'm trying to make the scrollbar background display a different image while the actual moving part of the the scrollbar (the thumb) is active. The thing is, the code I'm using isn't working for reasons unknown to me.

Near the top of the file I have this bit of code

Code:

scrollbar[orient="vertical"] {
    width:16px;
    padding: 0px !important;
    margin: 0px !important;
    background: url("chrome://global/skin/scrollbar/vert-bg.png") repeat-y bottom right;
}
That is the scrollbar background in its normal state. I want the vert-bg.png to change to vert-bg-active.png when the thumb is active, so I inserted this code

Code:

thumb[orient="vertical"]:active > scrollbar[orient="vertical"] {
    background-image: url("chrome://global/skin/scrollbar/vert-bg-active.png");
}
As far as I can tell, there's nothing wrong with that second bit of code, but then again, I don't know much about >'s so maybe I'm way off.

So do any css junkies have any ideas?

Last edited by GGF0RCE (2008-01-16 20:30:20)

Ryan
Member
+1,230|7123|Alberta, Canada

Zimmmmaaaaa!!!!!! to the rescue.
tkoi
Utahraptor!
+148|6427|Texas

Ryan wrote:

Zimmmmaaaaa!!!!!! to the rescue.
Yes, with any luck. But he's offline
konfusion
mostly afk
+480|6829|CH/BR - in UK

Ryan wrote:

Zimmmmaaaaa!!!!!! to the rescue.
He's sleeping right now - like the normal people in the european area... I'm stupid.

-konfusion
Ryan
Member
+1,230|7123|Alberta, Canada

GGF0RCE wrote:

Ryan wrote:

Zimmmmaaaaa!!!!!! to the rescue.
Yes, with any luck. But he's offline
He be sleepings. PM him, and he'll get back to you tomorrow.
elbekko
Your lord and master
+36|6681|Leuven, Belgium
> is the child of operator. As in: a > b is style element b with parent a.

Just use this?

Code:

scrollbar[orient="vertical"]:hover {
    background-image: url("chrome://global/skin/scrollbar/vert-bg-active.png");
}
tkoi
Utahraptor!
+148|6427|Texas

elbekko wrote:

> is the child of operator. As in: a > b is style element b with parent a.

Just use this?

Code:

scrollbar[orient="vertical"]:hover {
    background-image: url("chrome://global/skin/scrollbar/vert-bg-active.png");
}
I've tried that. It makes the background how I want it, but only behind the thumb and not the whole scrollbar.
elbekko
Your lord and master
+36|6681|Leuven, Belgium
Hrmm, no idea then. Try checking in other styles that have this effect?

Board footer

Privacy Policy - © 2025 Jeff Minard