SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2012
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scrollbar on top of a div

    Guys, I'm developing a simple gallery where the thumbnails are displayed below the large image within a div. As this div is smaller than the number of images, will have scrollbar, but I want that scrollbar is at the top of the div. How do I do that?
    *
    I was trying it, but I do not know how to get div width auto.

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,197
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    A better and nicer solution for something like this would be to use a custom jQuery scrollbar plugin that way its consistent between every browser and only requires on extra element inside a parent container rather than the extra jQuery and child container you currently have.

    https://www.google.com/search?q=cust...hrome&ie=UTF-8

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2012
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I'm using it and it worked perfectly, but as my gallery is Galleriffic, I want that when I click "Next Photo" scrolling moves.

  4. #4
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,197
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Personally I would go with something like jScrollPane which has a very nice API behind it, I have used it in the past and within around 10 minutes I had it styled, working and integrated into my own custom JavaScript using the API where as the jQuery UI slider isn't really that trivial to setup with custom event triggers.

    http://jscrollpane.kelvinluck.com/
    http://jscrollpane.kelvinluck.com/api.html


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
  •