
- #Fluid image lightbox how to
- #Fluid image lightbox code
- #Fluid image lightbox professional
- #Fluid image lightbox series
Lightbox 2 is sort of a fun little tool that is very useful if one wants to display images from either links or thumbnail versions of an image.
#Fluid image lightbox how to
The last example shows how to setup a second sequence of images note that these images are banded together as 'roadtrip2' and as such they will be kept separate from the other images on this page when viewed using Lightbox: This example as well as the next both display thumbnail versions of the image.
#Fluid image lightbox series
In this case, there are three images using that name and so those three images are treated as a single series other images on the page that do not use 'roadtrip1' are ignored. Note the passing of "roadtrip1" to Lightbox all links using 'roadtrip1' will be treated as a group of images. The defined sequence may be controlled by the user with either the mouse or the left and right arrow keys (to move back and forth through the images). The next example shows how to setup a sequence of images. Next up, within the form, the first example shows using a simple link to an image the "rel" tag defines the relationship to the Lightbox style sheet and that is pretty much all that you need to do to evoke the effect. The first bit of actual work is contained in the head section of the markup here the JavaScript is references as is the style sheet: The markup starts with the following unmodified, default code: What little work is required to implement Lightbox 2 is contained in the Default.aspx file itself. Protected void Page_Load( object sender, EventArgs e)

It is in its default condition and is shown here to illustrate that no coding is required to make use of Lightbox 2.
#Fluid image lightbox code
No additional code was provided to the default page's code behind file. If starting a new project, just create the three folders using these folder names and then copy the contents over into each of the folders from the Lightbox 2 download. Additional images were added to the images folder to support the demonstration project. These folders contain the style sheet, images, and JavaScript provided with the Lightbox download. The solution contains three added folders: css, images, and js. The solution contains a single web application entitled, "LightBoxDemo". Open the web application and examine the contents in the solution explorer. In order to get started, unzip the included project and save it to your hard drive. (Clicking a link or an image will launch the image into Lightbox) Once the image is displayed, the user may click off the image or hit the Escape key in order to return to the page.įigure 1: Lightbox in Use within an ASP.NET Web Applicationįigure 2: Lightbox at Rest within an ASP.NET Web Application If the image is too large, it will overrun the page so it is important to resize the images so that they will fit within the space available. As each image is displayed, the control is resized to fit the image and the image is centered on the page. All in all, it is a nice way to present a image gallery of thumbnails. Images grouped into sequences may be viewed by the user in a slideshow like presentation that the user can control with either the mouse or the left and right arrow keys. Lightbox allows the developer the option of displaying images singly or in sequence. The download includes all of the images, style sheets, and JavaScript necessary to implement Lightbox. Implementation of Lightbox is quite simple involving nothing more that adding some JavaScript and a style sheet to the page and then adding some simple attributes to each link where the effect is to be used.
#Fluid image lightbox professional
a simple, unobtrusive script used to overlay images on the current page." It delivers a nice, professional looking method for displaying images as overlays through the use of hyperlinks.

Lightbox 2 is a free download made available by Lokesh Dhakar on this website:
