Cusomize scrollbars - css?

Discussion in 'HTML' started by Stefano Palazzo, Aug 16, 2005.

  1. 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
    Stefano Palazzo, Aug 16, 2005
    #1
    1. Advertising

  2. Stefano Palazzo

    Jedi Fans Guest

    Stefano Palazzo wrote:
    > 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

    --
    Hope This Helped and MTFBWY...
    Kieren aka JediFans - <URL:http://jedifans.com/>
    The Force Is With Me, SuSE Linux Professional 9.3, Mozilla Firefox
    1.0.6, Mozilla Thunderbird 1.5 Alpha 2 and Revenge Of The Sith!
    Jedi Fans, Aug 16, 2005
    #2
    1. Advertising

  3. Stefano Palazzo

    Safalra Guest

    Stefano Palazzo wrote:
    > 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.

    --
    Safalra (Stephen Morley)
    http://www.safalra.com/hypertext/
    Safalra, Aug 16, 2005
    #3
  4. Stefano Palazzo

    Traveller Guest

    On Tue, 16 Aug 2005 15:58:56 +0200, Stefano Palazzo
    <> wrote:

    >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/
    Traveller, Aug 16, 2005
    #4
  5. Stefano Palazzo

    Jedi Fans Guest

    Traveller wrote:
    > On Tue, 16 Aug 2005 15:58:56 +0200, Stefano Palazzo
    > <> wrote:
    >
    >> 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>


    just pointing out that is not valid css...

    --
    Hope This Helped and MTFBWY...
    Kieren aka JediFans - <URL:http://jedifans.com/>
    The Force Is With Me, SuSE Linux Professional 9.3, Mozilla Firefox
    1.0.6, Mozilla Thunderbird 1.5 Alpha 2 and Revenge Of The Sith!
    Jedi Fans, Aug 16, 2005
    #5
  6. Jedi Fans wrote:
    > Traveller wrote:
    >> On Tue, 16 Aug 2005 15:58:56 +0200, Stefano Palazzo
    >> <stefano.palazzo> wrote:
    >>
    >>> 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>

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

    ....only works in IE.
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Under construction
    Edwin van der Vaart, Aug 16, 2005
    #6
  7. Edwin van der Vaart wrote:

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

    > ...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/
    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 16, 2005
    #7
  8. David Dorward wrote:
    > Edwin van der Vaart wrote:
    >
    >>>just pointing out that is not valid css...

    >>
    >>...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.
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Under construction
    Edwin van der Vaart, Aug 16, 2005
    #8
  9. Edwin van der Vaart wrote:

    > 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.


    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 16, 2005
    #9
  10. David Dorward wrote:
    > Edwin van der Vaart wrote:
    >
    >>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.

    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.
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Persoonlijke website
    Edwin van der Vaart, Aug 16, 2005
    #10
  11. Stefano Palazzo

    Toby Inkster Guest

    Stefano Palazzo wrote:

    > 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.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Aug 16, 2005
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dbuchanan

    DataGridView Scrollbars missing

    dbuchanan, Jan 10, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    16,029
    goldberg
    Nov 18, 2008
  2. Don

    Scrollbars

    Don, Dec 17, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    504
    Kevin Spencer
    Dec 17, 2003
  3. mg

    DataGrid with scrollbars

    mg, Jan 3, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    583
    Saravana [MVP]
    Jan 5, 2004
  4. Steffen Loringer

    Get width of scrollbars

    Steffen Loringer, Feb 6, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    361
    Steffen Loringer
    Feb 6, 2004
  5. Yereth Jansen

    Off page scrollbars with div and css

    Yereth Jansen, May 9, 2005, in forum: HTML
    Replies:
    16
    Views:
    983
    Yereth Jansen
    May 16, 2005
Loading...

Share This Page