PDA

View Full Version : Lightbox issues...



lozbenson
Sep 14th, 2009, 08:14 PM
If you go onto my site:

www.erbimages.com

and then go to all galleries > pick a gallery > pick an image the top padding on the basic lightbox effect is completely misread in some IE browsers.

The problem has occurred as lightbox was starting to low down the page so, as you can see in my CSS, I used margin-top: -25px;

This has worked on all other browers...

PLEASE HELP!!! THANKS

Rowsdower!
Sep 15th, 2009, 12:24 AM
If you go onto my site:

www.erbimages.com

and then go to all galleries > pick a gallery > pick an image the top padding on the basic lightbox effect is completely misread in some IE browsers.

The problem has occurred as lightbox was starting to low down the page so, as you can see in my CSS, I used margin-top: -25px;

This has worked on all other browers...

PLEASE HELP!!! THANKS

In general, using negative margins is unreliable for cross-browser display, especially in the "y-axis." Instead you need to change the position of the #lightbox div.

The script generates inline CSS that gives it a position of top:82.5px (this value is generated based on window height at the time the image is opened). You need to find that line of the script and change the math that's at work here or else add a line to the CSS to override the inline style.

To do the CSS thing you'll need to use !important so take a look on Google to see how that works. Really though, you should be working with Lightbox to make the change as the CSS way is kind of hack-y.

lozbenson
Sep 16th, 2009, 01:57 AM
Thanks, how does it look now? I can't see on IE as I only have access to a Mac...

THANKS :thumbsup:

Rowsdower!
Sep 16th, 2009, 11:09 PM
Thanks, how does it look now? I can't see on IE as I only have access to a Mac...

THANKS :thumbsup:

It looks the same here in FF3 and IE7 now.