Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to change scrollbar

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #45303
    jorno
    Member

    Hi,

    I would like to change the scrollbar in the following code. Can anybody help me with that?

    Thanks!


    2013

    13 september   De Vest,          Alkmaar

    22 september   Blauwe Zaal,   Utrecht

    24 september   Schouwburg,   Leiden

    25 september   Schouwburg,   Eindhoven

    28 september   Posthuis           Heerenveen

    29 september Theater Bellevue, Amsterdam

    11 oktober Orpheus, Apeldoorn


    #137706

    You can only do it in css with webkit. Else you need to do it with javascript.
    [Webkit](https://css-tricks.com/custom-scrollbars-in-webkit/https://css-tricks.com/custom-scrollbars-in-webkit/”)

    #137713
    jorno
    Member

    Can it be done with javascript within this code?

    #137715

    With some Googeling i’ve found [this link](http://gondo.webdesigners.sk/javascript-scrollbar/http://gondo.webdesigners.sk/javascript-scrollbar/”).

    Is it the implementation you are unsure how to do?

    #137720
    jorno
    Member

    Yeah, i’m very new to this. Could you show it to me in the code above?

    #137722

    <!DOCTYPE html>
    <html>
    <head>
    <style type="text/css">
    * {
    color:red;
    font-family:"Futura","Times New Roman", Times, serif;
    text-shadow: 1px 1px #000000;
    }
    .scrollholder{
    position: relative;
    width: 300px; height: 200px;
    overflow: auto;
    z-index: 1;
    background-color: #f3f3f3;
    }
    .scroll{
    position: absolute;
    left: 0; top: 0;
    width: 95%;
    z-index: 2;
    }
    /* <Scroll> */
    .track{
    position: relative;
    float:right;
    top: 0;
    width: 11px; height: 100%;
    font-size: 0;
    z-index: 3;
    background: black;
    }
    .drag_bar{
    position: absolute;
    width: 100%; height: 14px;
    cursor: pointer;
    z-index: 4;
    background: yellow;
    }
    </style>
    <script src="http://gondo.webdesigners.sk/wp-content/javascript-scrollbar/js/scroll.js"></script>
    </head>
    <body>
    <div id="scrollholder" class="scrollholder">
    <div id="scroll" class="scroll">
    <p>your text...</p>
    </div>
    </div>
    <script>ScrollLoad ("scrollholder", "scroll", true);</script>
    </body>
    </html>
    #137724

    Try to Google some about this and read. It’s important that you understand the basics about what is happening in the code above. This solution isn’t the best and it’s not “best practice” to alter the scrollbars design.

    #137725
    Paulie_D
    Member

    Especially since this:

    2013

    13 september   De Vest,          Alkmaar

    22 september   Blauwe Zaal,   Utrecht

    24 september   Schouwburg,   Leiden

    25 september   Schouwburg,   Eindhoven

    28 september   Posthuis           Heerenveen

    29 september Theater Bellevue, Amsterdam

    11 oktober Orpheus, Apeldoorn

    …is very bad HTML.

    #137730
    jorno
    Member

    Thanks adahei!

    And Paulie D, I know, but just started. Is there a good tutorial you can recommend?

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.