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 (281)

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 25 of 29 pages « First  <  23 24 25 26 27 >  Last »

the code is excellent, pure CSS. Thanks.. ;)
Posted by Fabio Langer on 04/16, 05:25 PM
Just have to say first Thanks this is great. Have a question though as I add images and have to use my scrollbar I lose the Bigger image because it still views top left corner. I am in school so learning any tips would be great.
Thanks again
Posted by Michelle on 04/19, 01:37 PM
Can anyone help?? When I use this code (the text to pic i.e. Dynamic Drive& Zoka Coffee), I cant seem to get the images to appear in the same place? I want them to be the same distance from the top of the page?

Can anyone help please?
Posted by brad on 04/22, 09:59 PM
Hi,
I like this script. I only have a small problem. When there are more pictures on the page and I need to scroll, the large image is hidden. Is there anyway that you can allow the large image to appear?

Thanks for any help
Posted by Gilles on 04/23, 09:05 AM
How can i get the large photos to be placed a little lower on the page? At the moment they are going over the top of my menu bar? I am only using the text sample, not the photo one

PLEASE HELP
Posted by brad on 04/23, 07:57 PM
how can i use that code for drupal ?
Posted by rujak on 05/02, 07:10 PM
really simple fast aproach! thanks!
Posted by tobto on 05/05, 11:18 AM
any idea how to keep the images on after mouse out.
i dont like the fact that they dissapear. not sure if this can be done with css alone.
Posted by james on 05/05, 08:52 PM
This CSS thumbnail gallery is neat. When going to thumbnail, I just want bigger image/text stay. - mouseout or something.

Please help. Thanks.
Posted by Michael on 05/13, 01:13 PM
Easy, simple and powerful!
Thanks.
Posted by John on 05/19, 01:04 AM

Comment Pages 25 of 29 pages « First  <  23 24 25 26 27 >  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