Advanced Search Usage Terms Submit Contact
Dynamic Drive CSS Library
 
CSS Library
Submit an original CSS code
CSS Layouts
Web Graphics
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 (322)

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 22 of 33 pages « First  <  20 21 22 23 24 >  Last »

Thanks a lot for this great code! Just one question: Why is the text under the image always underlined?
Posted by Stefanie on 01/04, 06:53 PM
Beautiful! This is a perfect solution to my gallery problem! Thanks!
Posted by Liz on 01/04, 11:33 PM
Trying to find code to prevent printing the enlarged photos from a Front Page photo gallery.
Posted by Robbin Gulino on 01/07, 11:26 AM
hmmm i need citations in the boxes but it doesn't show up example: <http://........>
Posted by FBH on 01/09, 08:16 PM
It preloads the images. Totally useless for large amount of images or slow speed connection.
Posted by commander cool on 01/14, 09:20 AM
Great piece of code. Thank you. Works like a charm, and is simple and elegant.
Posted by Julian Gordon on 01/16, 02:23 PM
Brilliant just what I was looking for
Posted by Melanie on 01/19, 09:00 AM
Why is this image gallery not working properly in Safari??? I finally got it fuction in Firefox on PC and MAC and in IE on PC, but safari is a mess.

Any one have this issue??

Please help!
Posted by Deborah on 01/22, 07:04 PM
Muy buena animacion.

Codigo simple pero con gran efecto, espero haya mas de esto, si es asi me lo hacen saber... http://christiansaldana.pe.nu o mr_frosg@hotmail.com se los agradecere...
Posted by Christian on 01/25, 07:39 AM
Really good to have in my web buiding repertoire.
Thank you.
Posted by algarve on 01/26, 12:20 PM

Comment Pages 22 of 33 pages « First  <  20 21 22 23 24 >  Last »

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