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

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 51 of 53 pages « First  <  49 50 51 52 53 >

Does anyone have any idea how i can add this to my website?
Posted by Anomous on 05/01, 12:40 PM
Thank you, Eric, for your generosity. This simple tool is what will make my site pop in the eyes of my visitors. I cannot overstate my appreciation for your desire to help others. I also find many of the posters' comments educational.
Posted by Brian in NY on 05/01, 01:03 PM
I am very new at all of this and I am now quite confused. I am trying to make a popup on my home page, but when I enter the information it does nothing. What am I doing wrong? How can I customize this to show my popup? Please help a confused and wondering want-to-be techy.
Posted by Tina on 05/02, 01:56 PM
Hi, this is excellent code, simple yet effective. The only issue is that for galleries that span the page the large image shifts off the right of the page. Is there any way of showing it to the left of the cursor? I am guessing this might take some javascript if so I don't mind but if not then even better!
Many thanks
Posted by Gabriel Thornton on 05/05, 07:27 AM
Hi,

Since installing IE 8, the large popup image is behind the thumbnail. The Compatibility mode of IE8 has no effect. This seems to only occur in IE8 and not FireFox, Opera, Chrome, Safari or others.

The script is great. I have used it for a long time.

Thanks.
Posted by Ken on 05/05, 09:07 PM
I’ve already shared this page with a couple of friends now. Great find! Will be back often to check up on new information you put here!
Regards,
Gifts for Mother
Posted by For Moms on 05/10, 03:00 AM
Pretty cool CSS, though there's a small problem when hovering on the first thumb nail and trying to access the second one witout moving out of focus.
Posted by Peter on 05/11, 09:08 AM
When I load the page, the links do not scroll along with the content. HHEELLPP!!! :(
Posted by Roberto de NObrega on 05/12, 11:02 PM
Guillaumeb - you need to take the "2" off "stylesheet" - it isn't necessary. It will use any and all stylesheets referenced without having to differentiate them there. Just do

<link rel="stylesheet" href="viewer.css" type="text/css" >

:)
Posted by Dawn on 05/17, 11:45 AM
I'm having the same problem Ken on page 51 is having...

"Since installing IE 8, the large popup image is behind the thumbnail. The Compatibility mode of IE8 has no effect. This seems to only occur in IE8 and not FireFox, Opera, Chrome, Safari or others."

Help!

Thanks
Posted by Ed on 05/19, 03:15 PM

Comment Pages 51 of 53 pages « First  <  49 50 51 52 53 >

Commenting is not available in this weblog entry.
Copyright 2006-2008 Dynamic Drive Read our Usage Terms before using any of the CSS codes.
Dynamic Drive DHTML and CSS Code Library