Cusomize scrollbars - css?

S

Stefano Palazzo

Hi

Is there a way to customize the scrollbar(s) of a single DIV with css?
It should be Valid CSS and Valid XHTML Strict as well ;)

hf,
Stefano
 
J

Jedi Fans

Stefano said:
Hi

Is there a way to customize the scrollbar(s) of a single DIV with css?
It should be Valid CSS and Valid XHTML Strict as well ;)

scrollbars are part of the browser not the page, hence a no
 
S

Safalra

Stefano said:
Is there a way to customize the scrollbar(s) of a single DIV with css?
It should be Valid CSS and Valid XHTML Strict as well ;)

You can only do this with custom (hence non-valid) CSS attributes in
some browsers, and it's usually a bad idea to change the user interface
anyway.
 
T

Traveller

Hi

Is there a way to customize the scrollbar(s) of a single DIV with css?
It should be Valid CSS and Valid XHTML Strict as well ;)
hmm, this might work:

<style type="text/css">

{
scrollbar-face-color : #C0C0C0 ;
scrollbar-track-color: #C0C0C0 ;
scrollbar-arrow-color: #000000 ;
scrollbar-shadow-color: #000000 ;
scrollbar-highlight-color: #C0C0C0 ;
scrollbar-darkshadow-color: #C0C0C0 ;
}

</style>




--
de groeten,

martin

http://home.planet.nl/~rotz0008/
 
J

Jedi Fans

Traveller said:
hmm, this might work:

<style type="text/css">

{
scrollbar-face-color : #C0C0C0 ;
scrollbar-track-color: #C0C0C0 ;
scrollbar-arrow-color: #000000 ;
scrollbar-shadow-color: #000000 ;
scrollbar-highlight-color: #C0C0C0 ;
scrollbar-darkshadow-color: #C0C0C0 ;
}

</style>

just pointing out that is not valid css...
 
D

David Dorward

Edwin said:
...only works in IE.

Works in Konqueror and Opera[1] too, thankfully it can be shut off in all
(Opera has a preference, IE/Konq have user style sheets).


[1] I /think/
 
E

Edwin van der Vaart

David said:
Edwin said:
...only works in IE.

Works in Konqueror and Opera[1] too, thankfully it can be shut off in all
(Opera has a preference, IE/Konq have user style sheets).

[1] I /think/
Tried with opera 8.01_nl (win-xp), no effect.
Konqueror (Mandriva 2005), no effect.
IE6 (win-xp), effect.
 
D

David Dorward

Edwin said:
Tried with opera 8.01_nl (win-xp), no effect.
Konqueror (Mandriva 2005), no effect.

Just tested in both of these. Looks like it only works in Quirks mode. Its
still a horrible effect though.
 
E

Edwin van der Vaart

David said:
Just tested in both of these. Looks like it only works in Quirks mode. Its
still a horrible effect though.
I see. I hadn't in quirck mode. That's why I didn't saw the effect.
But still, a don't do that thingy.
 
T

Toby Inkster

Stefano said:
Is there a way to customize the scrollbar(s) of a single DIV with css?
It should be Valid CSS and Valid XHTML Strict as well ;)

In your <head>:

<meta http-equiv="Content-Style-Type"
content="text/x-extendedstyles">

In your <body>:

<div style="scrollbar-face-color:#C0C0C0;
scrollbar-track-color: #C0C0C0;
scrollbar-arrow-color: #000000;
scrollbar-shadow-color: #000000;
scrollbar-highlight-color: #C0C0C0;
scrollbar-darkshadow-color: #C0C0C0;">foo bar</div>

This is valid XHTML, and (technically) it doesn't use CSS. ;-)

Of course, changing scroll bar colours is a stupid idea to begin with -- you'll
only end up confusing your users.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top