I've been trying to change the position of the lightbox image when activated. I get the loading and the loaded image too close to the top as everyone else using this drupal module, and am not able to find the solution to fix lightbox.css to put the image in the middle of the page, similarly done on the official project site http://www.huddletogether.com/projects/lightbox2/

Is there a way to position this box so that it would be in the middle?

Comments

stella’s picture

Assigned: Unassigned » stella
Status: Active » Postponed

You can move the image further down by adding e.g. "top: 100px;" to both the #outerImageContainer{} and #imageDataContainer{} in the lightbox.css file.

This is not something I'm planning on implementing in the near future, unless this is a feature that more users request.

Cheers,
Stella

stella’s picture

Oh and you also need to add "position: relative;" to the #imageDataContainer{}

stella’s picture

Marked #141770 as a duplicate of this issue.

stella’s picture

Assigned: stella » Unassigned
whoey’s picture

I seem to get a "double" close button in all browsers, it seemed to go away by removing
padding-top: 0.7em; from
#imageData #bottomNavClose { in the css file

stella’s picture

Released 5.x-2.0 and 6.x-1.0.

whoey: please try with one of the new releases. If the problem persists, please open a separate issue for it.

Cheers,
Stella

bandwidthjunkie’s picture

Rather than messing around with the CSS, which seems not to work - the image is raised, but the menu at te botom gets stuck under an opaque box - you can modify the lightbox.js script around line 400 (try 411) in function imageLink is the line:
var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10)

Changing this to
var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10) + 100
drops everything by 100 pixels.
var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10) - 100
raises everything by 100 pixels.

The line below deals with the horizontal offset.

stella’s picture

Status: Postponed » Closed (works as designed)
Sami_Ghname82’s picture

Hi bandwidthjunkie,

How can take the mouse click position and add to the lightbox position.