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 Popup Image Viewer

Author: Dynamic Drive

Enable arbitrary links or image thumbnails to pop up an enlarged (different) image onMouseover by using this CSS code. With the help of CSS's ":hover" pseudo class, combined with relative and absolute positioning, the enlarged images are simply included on the page as normal HTML, "popping" up on demand. CSS is behaving more and more like scripting!

Demo:

One of my favorite foods is sushi
Doesn't this look good?
, and it's good for you too! Coffee and sushi probably don't mix well, but I like some Zoka Coffee
Zoka Coffee
to boot! Here are some thumbnails from my trip to La la land:


Simply beautiful.

So real, it's unreal. Or is it?

The CSS:

The HTML:

Code Info

Rate this code:

Date Posted: 05/07/2006

Revision History: None

Usage Terms: Click here

Your Comments (436)

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 16 of 44 pages « First  <  14 15 16 17 18 >  Last »

Thank you very wonderful
Posted by khalid on 02/27, 06:59 PM
Looks great, this is a great page to show to general users as a great css example!
Cheers,
Justin Frost
http://realstock.ca
Posted by Justin Frost on 03/02, 06:07 PM
Nice tip. I have been trying hard to find out dynamic applications of CSS.
Its Really usefull
Posted by Ningsuhen on 03/05, 03:53 AM
Is there anyway to target this to open in a seperate frame that is part of the page?
Posted by Ryan on 03/05, 11:30 PM
hi. this is amazing and i LIKE it !!
but is there anyway to avoid loading the larger image when the page loads ?
i mean the larger image loads when it is hovered.
Posted by Ali Sarshad on 03/06, 07:13 AM
I'm using an ASP.NET datalist so my images come from this:

ImageUrl='<%# eval("Image01") %>'

How do I get the <a href="#thumb" to live happily with ImageURL in my datalist?
Posted by Karen on 03/06, 11:59 AM
I am using the pop up image viewer code (from this site) for flash.swf files. This works very nicely in all browsers (Mac and PC) except Firefox on a PC. (it does work in firefox on a MAC). Can anyone please help?

<td><a class="thumbnail" href="#thumb"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="148" height="22">


<embed src="tips.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="148" height="22"></embed></object><span><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="148" height="22">


<embed src="tips1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="148" height="22"></embed></object>
Posted by Linda Rockhill on 03/06, 09:04 PM
its fine and I am going to use, and one more can u please modify on click action for this,
Posted by manjunath on 03/08, 11:18 PM
ASP.NET answer:

<a class="thumbnail" href="#thumb">

<asp:Image ID="Image2"
CssClass="thumbnail"
runat="server"
EnableViewState="true"
AlternateText="Salvage"
ImageUrl='<%# eval("Image01") %>'
Width="60px"
Height="80px"
BorderStyle="Solid"
BorderWidth="1px"
style="left: 0px; top: 1px"
BorderColor="SaddleBrown" >

<span>

$ <%# eval("Price", "{0:C}") %>
<%#eval("Image02")% >
</span>
</a>
Posted by Karen on 03/08, 11:34 PM
The bottom description under the enlarged image seems to break in IE6. Is there a fix for that?
Posted by Josh on 03/12, 11:45 PM

Comment Pages 16 of 44 pages « First  <  14 15 16 17 18 >  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