Center Lightbox in Viewport for Horizontally scrolling site

http://tend.wpengine.com/gallery/green-weddings/centerpieces/

See how when you scroll to the right and click on a thumbnail the lightbox is moving off screen to the left? Any way around this?

Hey Extravaganza,

This happens because the width of the lightbox container is set to 100% width and positioned absolutely. The 100% width is of course the viewport width and not the document width, so when you start scrolling right, it gets left behind on the left.

To fix this you could make the container div (#slb_viewer) fixed by changing “position:absolute;” to “position:fixed;”. This should keep it visible in the viewport when scrolling :slight_smile:

A very belated thank you