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:
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 3 of 53 pages < 1 2 3 4 5 > Last »
In Firefox, when you tab to the thumbnail link appears a big focus rectangle. Even if you remove the left: -1000px (which I should guess is a hack for some browser) the focus rectangle covers also the area that is not visible.
This "problem" goes away using display instead of visibility.
Also, if you are only using text in the popup, you should give a "width" to the span.
Also, in Opera, the text underneath the photo is still there when the pointer is removed from hovering.
Anyway, the first issue, check it out easily here http://ia.heavysheep.com/
If someone is already using this script can reassure me, posting a link to a real fully functional page?
TIA, Virgix.


.thumbnail{
position: relative;
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
text-decoration: none;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: #000000;
padding: 5px;
left: -1000px;
display:none;
color: #ffffff;
text-decoration: none;
font-weight:bold;
font-size:11px;
}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
text-decoration: none;
}
.thumbnail:hover span{ /*CSS for enlarged image on hover*/
display:inline;
text-decoration: none;
top: 0;
/*position where enlarged image should offset horizontally */
}