View Full Version : LightBox, limit max size

08-14-2006, 02:24 AM
1) Script Title: Light Box


3) Describe problem: I have the lightbox script running, its great by the way. I'm dynamically loading images of verious sizes. I have figured out how to limit the white box that sits behind the image. How can I limited the size of the images that display. if (imgPreloader.width > 800) imgPreloader.width =800;

08-14-2006, 06:26 AM
Your link to the script here on DD isn't working. Please edit your post and correct that. Css could be used to set max-width and/or max-height for the images displayed. IE doesn't support that but has the 'expression' technique available for style that can simulate it.

Before you go to that trouble though, it is a rather simple matter to batch process your images to fit into a box using various image processing programs and the good ones can do it much better than any styling coupled with the browser can. It will also make them load faster (particularly important for dial up connections) and take up less disk space.