Lightbox is an application used to display large images inside modal windows. By now, most of us have come across a gallery that makes use of such an application. Clicking on the thumbnail in the gallery, brings up a modal window which displays the larger image. Over the years, the lightbox has been enhanced to display all sorts of content, not just images. Today, there are numerous lighbox variations available on the web. The Greybox, Lightbox JS, Greased Lightbox, Prototype window class, LITBox, Suckerfish HoverLightbox, Theickerbox, WP Lightbox, and the list goes on. All of these variations have their particular features. Where some are limited, others excel and vice versa. What is consistent with the different variations is that they all require a Javascript library to perform the desired functionality. The downside to loading the Javascript library, is that it affects the website load speed which can sometimes be annoying. If you require the same Javascript library to run a number of applications, it makes sense to go this route. But if the sole purpose of the Javascript library, is the lightbox effect, there is a simpler answer, a 100% CSS lighbox effect. In essence, the lightbox fades the page in the background, while displaying the contents of the page in the foreground. You can achieve the exact same effect using CSS and two lines of Javascript to trigger the effect. You can easily customize the CSS code to suite the look and feel of your website, and maximize your page load speed. The source code, examples and implementation instructions can be found here: http://www.emanueleferonato.com/2007/08/22/create-a-lightbox-effect-only-with-css-no-javascript-needed/
Published in
Development Blog
MiguelE-mail: This e-mail address is being protected from spambots. You need JavaScript enabled to view itLatest from MiguelAdd comment |
Lightbox is an application used to display large images inside modal windows. By now, most of us have come across a gallery that makes use of such an application. Clicking on the thumbnail in the gallery, brings up a modal window which displays the larger image.

