Is there a way for the Lightbox to appeare alway in the same place when the css position is set to fixed?

When a lightbox link is further down the page the lightbox shows up on the bottom of the page and when the page is scrolled to the bottom and a link is pressed it only shows half of the lightbox. It is still fixed but not on its correct original position.

Is there a way around this?

thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pedromvpg’s picture

Issue tags: +lightbox position css
AaronBauman’s picture

Version: 6.x-1.9 » 6.x-1.x-dev
Status: Active » Needs review
FileSize
4.93 KB

You can do this in a CSS file, but the "top" CSS attribute of the box will get messed up because of this line right here in lightbox2.js:

var lightboxTop = arrayPageScroll[1] + (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1;

This patch doesn't change the default behavior, position:absolute, but allows admins to change it through lightbox2 settings at
admin/settings/lightbox2 > Advanced Settings > Skin Settings > CSS Position

This is rolled at 6.11, but it should apply to dev

AaronBauman’s picture

Fixed a typo. Should work now.

NineAllexis’s picture

Having the same issue on D7.
Applied the patch (manually), set the position top on admin/config CSS settings.
Somehow the pixels set doesn't work, it keeps set back to top:10px.