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

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 10 of 34 pages « First  <  8 9 10 11 12 >  Last »

Excelent.
Thx for this script.

I am trying to add a small feature to this script using php.

Filename must be picked dynamicaly from gallery/image diretory?

I am using this script in my site.

Thx a lot to author,
Regards,
Ravi
Posted by RaviGH on 12/17, 06:00 AM
Hi everyone! I am the webmistress for a non-profit theatre festival in Orlando and I installed this AWESOME gallery for their website. It works great in Firefox, but if you use IE, the enlarged photos display under the other css-generated layout graphics.

IF there is any advice out there to fix this bug, I'd greatly appreciate it.
Posted by Rachel Joyce on 12/17, 03:34 PM
Thanks to the author for this script!!

It's working out well for a site I'm constructing for a library's historical collection (everyone that viewed it was so impressed, and loved this feature of the site).

I did find a workaround (that works for me anyway) re: the gap problem when a footer is on the same page. In the thumbnail span area I changed the position to fixed, and it worked in FF, Safari, & Netscape (mac-based, don't know about windows yet).

This also shifts my enlarged image more toward the center of the browser window, which still works out OK for me. Hope this helps.
Posted by kat on 12/18, 08:42 PM
Dear Steven Butterworth,

I am very much thank full for this simple and gr8 CSS Image Gallery.
I went through your gallery http://homepage.mac.com/stevenbutterworth/Sites/cars/Iconic/index.html.
I want to use gallery.css file of your bove site.

I want to use this on my Personal web gallery. not for commercial/bussness use.
I am putting the bellow tag along with your css script.
-----------------------------------------------
/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */
-----------------------------------------------

Please let me know if i need to add anything else other than above tag.


Thanks & Regards,
Ravi
Posted by RaviGH on 12/19, 04:35 AM
Feel free Ravi bear in mind gallery.css is my file so I would appreciate if you would mention somewhere my own website, http://homepage.mac.com/stevenbutterworth
Posted by Steven Butterworth on 12/19, 05:02 AM
Thanks for Speed response.
Posted by RaviGH on 12/19, 05:24 AM
I always use

* {
margin:0px;
padding:0px;
border:0px;
}

to start my css files, but it seems that if you use the border:0px; statement this will NOT work in IE6.
I don't know why that happens ... hope this will help someone.
Posted by Mihai Georgescu on 12/19, 02:24 PM
A quick fix on the long space beneath the gallery that Kat mentioned ...(this space only shows up if you have a lot of image rows). I was attempting to load my page in an Iframe pop up window, you get the annoying scroll bars. Just add this css to the page:

html {
overflow-x: hidden;
overflow-y: hidden;
}
modify the "hidden" if you need one of the scroll bars
Posted by Brian on 12/21, 02:04 PM
Thanks a lot for Great code...
Posted by Kamlesh Khatri on 12/26, 01:37 AM
I like this code very much. So much that I've decided to use it on a project I'm working on. There is only one thing.
Can I make the "span Img" align so that the enlarged img is V-alinged in the middle or bottom off the thumb?
I'm planning on using about multiple pic/page and they are placed between "DIV"-tags
Posted by Kurt aka Mutley on 12/28, 07:28 PM

Comment Pages 10 of 34 pages « First  <  8 9 10 11 12 >  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