It seems that quite many people want to get their lightbox resizing automatically, but there were not many good solutions out there. I finally found a solution from Sebastien Grosjean, which was already integrated into a later, not yet very object oriented lightbox version, by Michael R. Bagnall. However the latest available one, which was upgraded to use latest Prototype and Scriptaculous versions, was not patched.

So this is what I did.
Please find my patched version of the Javascript and CSS file. Please take care to update image pathes in CSS and JS file. And the localization if you don’t speak German :-)

Detailed list of changes from Lightbox v2.04:

  • Added automatic resize method. Controlled by featBrowser & breathingSize options.
  • Corrected Opera 9 fix, to prevent disortion in FireFox on slidedown.
  • Tweaked the overlay to resize to windowHeight, not pageHeight.
  • When in a slideshow the next image had no title set it inherited the title of the previous one. that was fixed.
  • Tweaked some default parameters (thats my matter of taste :-) )

Many thanks to Lokesh Dhakar for creating this awesome Lightbox, that is still unmatched by soo many clones :-)