A simple CSS photo-album
31th July 2006
copyright © stu nicholls - CSS play
Information
I have had many requests for a simple photo-gallery in which there is a horizontal row of numbers across the bottom of the gallery, and when your visitors click any of these numbers a corresponding full size image is displayed above.
Well this is about as simple as it gets. The text numbers and images are held in an unordered list without any extra markup (no 'ems' or 'spans' etc). The CSS just styles the text numbers so that they appears in a box and the images so that they are hidden until your visitor clicks a number square.
I have used both landscape and portrait images to show how these can be accommodated and have limited the sizes to 320 x 240 pixels and 240 x 320 pixels just to show the method. You can, of course, resize this to fit any size/combination of images.
Copyright
Because of all the time and effort spent in producing this demonstration
I would ask that you respect my copyright.
- If you are using this on a personal web site then please add a link back to CSSplay and retain any copyright comment in the stylesheet.
A donation to the 'Support CSSplay' fund would be appreciated. - If you are using this on a commercial web site, or as a paying job for a client, then please email me asking for permission - stu{at}cssplay.co.uk and in this case a donation to the 'Support CSSplay' fund is required.
- If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.














