Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    47
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Make scroll bar start from center

    I have a div tag with very wide content(an image) that I want to start from the center and then be able to scroll left and right from there.
    By default the scroll bar starts on the left.
    Using overflow-x: scroll to get the limited width in the div that contains the image
    Any ideas?
    Last edited by mapleleaf; 08-29-2010 at 10:55 PM. Reason: clarity

  • #2
    New Coder
    Join Date
    May 2009
    Posts
    47
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Bump as no answers.
    Maybe I am not being clear.
    the div containing the wide img that I would like to show the center of has
    {overflow-x: scroll}
    but by default the scroll bar starts by showing the left side of the image. (The img is aligned to the left)
    Tx to anyone who has some clues for me.

  • #3
    New Coder
    Join Date
    Nov 2010
    Posts
    12
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Bump.

    I was wondering the same thing.

    I have a timeline that represents time on the X axis past to present left to right. i would like the present to be displayed with the overflow hidden under scroll to the left.

    my other option is to completely reverse the whole thing.

  • #4
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,899
    Thanks
    15
    Thanked 226 Times in 226 Posts
    A better idea might be to not use scroll bars at all, but just the cursor hand to move the image, like Google Maps and .pdfs use.


  •  

    Posting Permissions

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