Results 1 to 2 of 2

Thread: CSS popup alignment

  1. #1
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question CSS popup alignment

    1) Script Title: CSS Popup Image Viewer

    2) Script URL (on DD): http://www.dynamicdrive.com/style/cs...ge-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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    To change all pop up's top positions:

    Code:
    .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:

    Code:
    <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>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •