-
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!
-
-
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:
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.
-
-
Thanks a lot, I changed to Slimbox and it works beautifully!
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks