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 22 of 53 pages « First < 20 21 22 23 24 > Last »
just what I was looking for. Worked like a charm Thanks so much.
I noticed this when it was set to 20 and all the words of the caption were on different lines. To fix it I simply gave it a higher integer or lower negative integer (to give the caption more space). Doing this also affects the position of the pop-up too (duh).
Also, some of the images kept shooting off the page whereas some of them were fine. To fix this, I made a new class for the problematic ones and changed the hover span position again.
This is really cool. It's a lifesaver. Don't worry, I gave you credit.
Works fine on my 15" widescreen (running IE 7)but not on 19" monitor at work (running IE 6).
Could you check the coding is correct or advise why it is not working at work but is at home please.
Regards
.new:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
margin-top: 55px;
left: 55px; /*position where enlarged image should offset horizontally */
}
If you're not sure what I mean check out www.joshrodgers.com/portfolio.asp. Thanks,
Josh
Original:
<a class="thumbnail" href="#thumb">Some Name<span>images/someimage.jpgSome Description</span></a>
With a Valid Link:
<a class="thumbnail" href="http://www.google.com">Some Name<span>images/someimage.jpgSome Description</span></a>
Thanks for the fix. The only thing I didn't like about this cool tool was that my text was piling on top of itself. Your simple fix is great.
Mark
Comment Pages 22 of 53 pages « First < 20 21 22 23 24 > Last »
Commenting is not available in this weblog entry.






very good idea and very usefull