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 9 of 53 pages « First < 7 8 9 10 11 > Last »
<a class="thumbnail" href="#thumb"><img XXX="YOUR URL HERE" width="80px" border="0" >
<span><img id="book" img XXX="YOUR URL HERE" style="position: relative" >
</span></a>
<script type="text/javascript">
Drag.init(document.getElementById("book"));
</script>
---------------------------
There - take the above clip and put your image name in teh YOUR URL HERE and then replace the XXX with src. I had to change "img src" to "img XXX" to get the code to properly post on here.
any clue?
Another thing I'm having a problem with is, when using large popups, how to keep the popup within the boundaries of the user's browser window. Right now, if hovering over an image to the far right of the screen, the popup will simply load off the screen and force the user to scroll over to see it. Ideally I would like it to recognize when it breaks the boundaries of the window. Any way to do this?








<a class="thumbnail" href="#thumb">YOUR IMG URL
<span>YOUR IMG URL
</span></a>
<script type="text/javascript">
Drag.init(document.getElementById("book"));
</script>
Change width=80px to any size you want.