buckwilson/Lightbox_me — Issue #33: content appears off-center in some instances
Author: smabbott
Created: 2012-01-13 23:36:36+00:00
State: open

I've encountered some instances where images appear off-center to the right. The left edge of the image sits in the center of the window. You can simulate the effect by setting the left margin of the div that contains the image to 0. This sometimes fixes itself once the image finishes loading and always fixes itself if you scroll the page (presumably when setSelfPosition() is called).

My shot-in-the-dark guess at what is happening is that the positioning of the div occurs before the image finishes loading and the width of the image might not yet be known. Is there a known way to get around this?

I've seen this in Chrome and Safari. Haven't tried other browsers.

Thanks.