Lightbox Positioning Question

I've got another lightbox question. Some of the images I open in a lightbox are taller than my site is. Particularly the ones closer to the bottom edge of the site. When they're opened they expand exceeding the bottom edge and the transparent black overlay cuts off.

My question however is if anyone knows how to modify the lightbox script so that when they're clicked they open relative to the top edge of my site and not relative to the top edge of the browser (however far down the page it may be). I think if I were to have it set up like that none of my images would exceed the baseline of my site.

I've messed around with the css a bit and looked through the javascript files to no avail.

Any help would be greatly appreciated. I'm revising my site and this is one of the things that I'd really like to clear up.

#476886

It should already be positioned at the top:

(From the lightbox.css file)

#lightbox{
position: absolute;
top: 0;

That's weird. Is yours like this?

#476903

Like I said, lightbox is generally designed to open images centered in your browsers current point of view. If you're scrolled half way down the page, the image opens there. I want them all to indefinitely open centered on my whole site and not just in the current window's point of view.

EDIT: I have an idea. Would it be possible to set it to automatically jump to the top of the page (thereby loading the image with the maximum amount of allowable height) when opening them and then perhaps jump back down when they're closed? How would THAT be possible? :P

#476904

Just letting everyone know that after some research I figured it out. In the lightbox Javascript file you modify:

var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10);

To this:

var lightboxTop = 0;

This causes the box to open at the top of the site like I was going for. A margin-top property in the #lightbox class of the css gave it the spacing from the edge it needed as well.

Thanks anyway, hopefully this thread can help others with the same issue (or me if I forget in the future). :P

---------------------------------HOWEVER----------------------------------

I'd still like to figure out how to have it jump to the top of the page like an anchor when the lightbox is opened. If you know how to do that, It would help a lot.

#476922