Sliding Photograph Galleries

28th August 2009

copyright © stu nicholls - CSS play

Information

This gallery is my simplest yet. It is just an unordered list of images that are normally compressed vertically (reduction 8:1). When you hover over one of these compressed images it expands to full size. It is based on my sliding menu system and adapted to use images. No thumbnails are required and all the images are 'pre-loaded'.This method can be used either vertically, as shown, or horizontally.

Updated 1st July 2005

The horizontal slide photo gallery added.

The 'windows' photographs

The window set of photographs were taken by Mike Berg Winnipeg, Manitoba, Canada using a Canon PowerShot S100. http://www.antoniusberg.com/

Cascading Style Sheet

#gallery {
  padding:0; 
  margin:0; 
  list-style-type:none; 
  overflow:hidden; 
  width:320px; 
  height:425px; 
  border:1px solid #888; 
  background:#fff url(windows/win_back.gif);
  }
#gallery li {
  float:left;
  }
#gallery li a {
  display:block; 
  height:30px;
  width:320px; 
  float:left; 
  text-decoration:none; 
  border-bottom:1px solid #fff; 
  cursor:default;
  }
#gallery li a img {
  width:320px; 
  height:30px; 
  border:0;
  }
#gallery li a:hover {
  background:#eee; 
  height:239px;
  }
#gallery li a:hover img {
  height:239px;
  }

XHTML

<ul id="gallery">
<li><a href="#nogo">
<img src="windows/win7.jpg" alt="#1" title="#1" /></a></li>
<li><a href="#nogo">
<img src="windows/win8.jpg" alt="#2" title="#2" /></a></li>
<li><a href="#nogo">
<img src="windows/win9.jpg" alt="#3" title="#3" /></a></li>
<li><a href="#nogo">
<img src="windows/win10.jpg" alt="#4" title="#4" /></a></li>
<li><a href="#nogo">
<img src="windows/win11.jpg" alt="#5" title="#5" /></a></li>
<li><a href="#nogo">
<img src="windows/win12.jpg" alt="#6" title="#6" /></a></li>
<li><a href="#nogo">
<img src="windows/win13.jpg" alt="#7" title="#7" /></a></li>
</ul>


Copyright

Because of all the time and effort spent in producing this demonstration
I would ask that you respect my copyright.

  1. 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.
  2. 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.
  3. 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.

Please Support CSS play

Please note that if your donation is for a demo/menu then you will need to email me with the url of the demo/menu after making the donation

For more CSS demonstrations I recommend that you visit the Dynamic Drive CSS Library.


Free, practical CSS menus, layouts, and examples

Follow CSS play


Facebook   Twitter   Facebook Fan Page