Advanced Search

Results 1 to 3 of 3

Thread: css pop up image viewer - centre on page?

  1. #1
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default css pop up image viewer - centre on page?

    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!

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    I think you can center it horizontally with something like this
    Code:
    .thumbnail:hover span{
    visibility: visible;
    top: 200px;
    left: 50%;
    margin-left: -300px;
    }
    vertically, I don't know !

  3. #3
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •