Results 1 to 4 of 4

Thread: Scrollbar Keeps Moving

  1. #1
    Join Date
    Aug 2009
    Posts
    39
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Thumbs up Scrollbar Keeps Moving

    What's going on is every time a browser window resizes in Safari, the scrollbar that I created using the JavaScript from this site and created my own custom arrows, handle, and scrollbar. I'm wondering how to have it so that when the user resizes the browser window that I can have the content and scrollbar be in the middle and have the scrollbar stay next to the content? Please let me know if anything else is needed.

    Code:
    Here is my CSS:
    #scroller {
    position: relative;
    height: 275px;
    width: 550px;
    overflow: hidden;
    }
    
    .scroller-content {
    position: absolute;
    top: 0px;
    left: 0px;
    }
    
    #scrollbar-content {
    position: absolute;
    top: 40px;
    left: 60px;
    }
    
    .Scrollbar-Up {
    cursor: pointer;
    width: 28px;
    height: 36px;
    position: absolute;
    top: 270px;
    left: 880px;
    }
    
    .Scrollbar-Down {
    cursor: pointer;
    width: 28px;
    height: 36px;
    position: absolute;
    top: 457px;
    left: 880px;
    }
    
    .Scrollbar-Track {
    width: 9px;
    height: 151px;
    position: absolute;
    top: 306px;
    left: 890px;
    background: transparent url(/scrollbar.png) no-repeat center center;
    }
    
    .Scrollbar-Handle {
    position: absolute;
    width: 42px;
    height: 25px;
    }
    
    Here is the HTML:
    <div id="scrollbar-content">
    <img src="images/up_arrow.png" class="Scrollbar-Up" />
    <img src="images/down_arrow.png" class="Scrollbar-Down" />
    <div class="Scrollbar-Track">
    <img src="images/scrollbar_handle.png" class="Scrollbar-Handle" />
    </div>
    </div>
    <div class="content">
    <div id="scroller">
    <div class="scroller-content">
    This is where the content goes.
    </div>
    </div>
    Last edited by Abbster22; 01-06-2010 at 06:41 AM. Reason: Problem is resolved

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Abbster22 (01-06-2010)

  4. #3
    Join Date
    Aug 2009
    Posts
    39
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much but I have the problem resolved. =] I don't have the site currently posted up yet, but it will be up in a day or two.

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That's OK then, we won't need a link to it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •