/    Sign up×
Community /Pin to ProfileBookmark

scrollbar Questions

Hi –
I have a specific div set up using the
overflow-y:scroll;

I want to change the colors of the scroll bar – here is what I so far:

<script type=”text/javascript”>
function setScrollbarColor()
{
document.body.style.scrollbarArrowColor=”c38649″;
document.body.style.scrollbarTrackColor=”66452e”;
document.body.style.scrollbarBaseColor=”976839″;
document.body.style.scrollbarHighlightColor=”976839″;
document.body.style.scrollbarShadowColor=”976839″;
document.body.style.scrollbarDarkShadowColor=”976839″;
}
</script>

My four questions are:
1. Is there any way change just the background of the little arrow box?
Right now it is the same color as the TrackColor

  • 2.

    Is there any way/trick to change the width of the scroll bar ?

  • 3.

    Is there any way/trick to change the location of the scroll bar ?
    right now, its on the right and I want to move it to the left of the box.

  • 4.

    Is there any way of changing the images of the arrows or track bar?
    (that is, if question #1 and #2 cannot happen)

  • Thanks – jerryr125

    to post a comment
    JavaScript

    3 Comments(s)

    Copy linkTweet thisAlerts:
    @ShampieFeb 17.2008 — 1 & 2 -> For all possible changes on the scrollbar (using css) see:

    http://www.iconico.com/CSSScrollbar/

  • 3. make a custom scrollbar. or use in the body tag: <body dir="rtl">

    (this is normally ment for the Arabic language makeing the text go from right to left (but with css you can change it from left to right again), but can be usefull)


  • 4. Use custom scrollbar -> http://www.hesido.com/web.php?page=customscrollbar (To the body apply: <body style="overflow:hidden"> to remove the scrollbar)


  • I hope this answers all your questions
    Copy linkTweet thisAlerts:
    @jerryr125authorFeb 17.2008 — Hi - ok - great information....

    One more question - I saw a posting in which you can adjust the width of the scrollbar using javascript ; can someone please point me in the right direction.

    thanks - jerryr125
    Copy linkTweet thisAlerts:
    @felgallFeb 17.2008 — The scrollbar isn't considered to be a part of the web page and so web pages ca't change it at all in most browsers. In the few where it can be changed the browser owner can turn that option off so as to retain the scrollbars appearance to match all their other scrollbars. Trying to change it from a web page is a waste of time.
    ×

    Success!

    Help @jerryr125 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...