Results 1 to 3 of 3

Thread: Lightbox 2 positioning & scrolling

  1. #1
    Join Date
    Dec 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Lightbox 2 positioning & scrolling

    1) Script Title: Lightbox image viewer 2.03a

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem: I'm wanting to use Lightbox 2 for a portfolio site I'm building. The pages scroll horizontally instead of vertically and if you click one of the images when the page is scrolled beyond its starting position (i.e. any except the first three), the Lightbox display still pops up at the beginning of the page and you have to scroll back to see the enlarged image. I would like for it to be static or fixed (I still don't understand the difference between the two, sorry) so that it always pops up in the middle of the screen and can't be scrolled away. I have tried changing a few of the divs in lightbox.css, but I just keep screwing it up. Any help is very appreciated!

  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

    First thing I'd try is other lightbox type scripts, like Lightwindow, Lytebox, Thickbox, Slimbox, etc. The positioning engine in the original Lightbox isn't very robust, so others might be better suited to your project.

    Fixed positioning is probably what you are looking for, but it wasn't supported in IE until version 7. That may or may not be important to you. However, just slapping:

    Code:
    position: fixed;
    into the stylesheet in place of:

    Code:
    position: absolute;
    probably will not solve your problem because the script is still attempting to calculate things based upon the scroll state of the window and the size of the image, so the lightbox may appear out of range in a different direction.
    - John
    ________________________

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

  3. #3
    Join Date
    Dec 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot, I changed to Slimbox and it works beautifully!

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
  •