Advanced Search Usage Terms Submit Contact
Dynamic Drive CSS Library
 
CSS Library
Submit an original CSS code
CSS Layouts
Online Tools:

Advertise Here

CSS Library: Image CSS: Here

CSS Image Gallery

Author: Dynamic Drive

This is a purely CSS based image gallery that displays larger versions of thumbnail images dynamically when the mouse hovers over them. A rich HTML caption can be added to the enlarged image, and every aspect of the Image Gallery exists as plain HTML on the page. The idea is to use CSS's ":hover" pseudo class to cause an element to react onMouseover. When that happens, an absolutely positioned container holding the enlarged image, anchored on the page by another container with position set to relative, is shown. Furthermore, it's possible to modify the behavior so the enlarged images are only shown onClick, though IE6 currently doesn't support this behavior well. The gallery works in IE6+, Firefox, Opera 8+.

Demo:

Note: Here the enlarged images are set to "overlay" any content that it may come in contact with. You can easily disable overlaying just by giving the gallery container (.gallerycontainer) a height set to that of the largest image's.

The CSS:

The HTML:

Code Info

Rate this code:

Date Posted: 05/07/2006

Revision History: None

Usage Terms: Click here

Your Comments (289)

Got a question or need help customizing this CSS code? Post it in the CSS Forums. If you have a comment or suggestion instead, post it in the comments section below.

Comment Pages 29 of 29 pages « First  <  27 28 29

Thanks for the code, I am trying to validate it using the WDG HTML Validator, however it keeps complaining about the </a> here </span></a>


... ass="thumbnail" href="#thumb">
Error: element A not allowed here; check which elements this element may be contained within

Is there anyway to pass validation?
Posted by adrian on 08/01, 08:51 AM
this is amazing. I like the script so much.. thanks for the script.. check out it on my website..

thanks again...
Posted by bhagu on 08/14, 02:07 AM
sorry but didn't workout as I wanted... let me see now..
Posted by bhagu on 08/14, 02:38 AM
Great Code, but is possible to add a secong image when I do the mouse on over, example, when I do the mouse on over the picture with the horse, it will show the larger version of the picture and another picture in another container or in the same it doesnt matter...

anyone can please help me with that

Roger
Posted by Roger Cruz on 08/15, 09:18 AM
How to modify this code to show enlarged images onClick??
Posted by GlobaL6 on 08/22, 04:05 AM
works well with IE, but with mozilla ff the enalrged image spreads beyond the size of the window beyond the yellow background.
any idea how to control this?
Posted by fred on 08/23, 09:02 AM
youy got me
Posted by pichai on 08/25, 04:49 AM
good script ...
Posted by dynaz on 08/26, 02:44 AM
This is amazing thank you so much!!!!
Posted by dayday on 08/26, 05:38 PM

Comment Pages 29 of 29 pages « First  <  27 28 29

Name: (Required)

Email: (Required)

(NOT shown on page)

URL:

(Shown on page if entered)

Comments: (Required)

Supported BB codes: [b], [i], [u], [em], [strike], [strong], [pre], [code], and [blockquote].

Remember my personal information
Notify me of follow-up comments?

Submit the word you see below ("previewing" post does not require it):


Copyright 2006-2008 Dynamic Drive Read our Usage Terms before using any of the CSS codes.
Dynamic Drive DHTML and CSS Code Library