Log in

View Full Version : css pop up image viewer - centre on page?



tony@tonyhowell.co.uk
08-25-2010, 05:00 PM
Hi Folks, is there any way the brilliant css pop up image viewer can be centred on the page?
All I can do is change the top or left position in the css: -

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

}

Rollover the 'Info' links on this page to see what I mean: -
http://www.tonyhowell.co.uk/v/5208.php

Any help much appreciated, by the way I'm a photographer first, and web designer - well, much further down the list! :)

azoomer
08-25-2010, 10:50 PM
I think you can center it horizontally with something like this

.thumbnail:hover span{
visibility: visible;
top: 200px;
left: 50%;
margin-left: -300px;
}
vertically, I don't know !

tony@tonyhowell.co.uk
02-08-2011, 10:28 AM
Thank you for your kind response. I've been very happy with the code you offered, but now I've changed the website (why?! oh why?!!). Do you know if it's possible to code it so that the pop-up image appears a certain distance (say, 10 pixels) above the mouseover?
Any advice gladly received and I'll give a donation. Thanks, Tony