View Full Version : CSS popup alignment

08-01-2007, 08:30 PM
1) Script Title: CSS Popup Image Viewer

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/css-popup-image-viewer/P80/

3) Describe problem:

With the current code, the popup is aligned with the top of its thumbnail image. I was wondering if it's possible to have the popup appear above its preset position (higher than the top of the thumbnail)?

If that's possible, is it also possible to have the popup for 'image 1' aligned with its thubmnail and the popup for 'image 2' higher than its thumbnail?

Best Regards.

08-02-2007, 01:24 AM
To change all pop up's top positions:

.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: -70px;
left: 60px; /*position where enlarged image should offset horizontally */


To change just one, put the style inline for the span you wish to adjust:

<a class="thumbnail" href="#thumb"><img src="media/ocean_thumb.jpg" width="100px" height="66px" border="0" />
<span style="top:-70px;"><img src="media/ocean.jpg" /><br />So real, it's unreal. Or is it?</span></a>