Results 1 to 5 of 5

Thread: CSS Popup Image Viewer

  1. #1
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS Popup Image Viewer

    I am trying to get the popup image to popup in the middle of the page the problem I am having is the thumbnails on each side the popup image is off the page any ideas how to get them all to the middle?
    http://www.lilhoofbeatsminiaturehors...stallions.html

    Thanks,
    auct

  2. #2
    Join Date
    Aug 2007
    Location
    Brazil
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm not sure, but I think you'll have to re-do the code using fluid values (em or %). The original example doesn't say anything about centering the pics within the page.

    It's just a guess, based on the fact you're using absolute positioning and px
    values.
    Someone please correct me if I'm wrong.

  3. #3
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks naiani for responding. I know nothing about css here is the code that I got from here do you know what I would have to change?

    .thumbnail{
    position: relative;
    z-index: 0;
    }

    .thumbnail:hover{
    background-color: transparent;
    z-index: 50;
    }

    .thumbnail span{ /*CSS for enlarged image*/
    position: absolute;
    background-color: lightyellow;
    padding: 5px;
    left: -1000px;
    border: 1px dashed gray;
    visibility: hidden;
    color: black;
    text-decoration: none;
    }

    .thumbnail span img{ /*CSS for enlarged image*/
    border-width: 0;
    padding: 2px;
    }

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

    }

    </style>

  4. #4
    Join Date
    May 2007
    Location
    Viet Nam
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Do you read its comment?

    Code:
    top: 0;
    left: 60px; /*position where enlarged image should offset horizontally */
    Code:
    .thumbnail span{ /*CSS for enlarged image*/
    position: absolute;
    background-color: lightyellow;
    padding: 5px;
    left: -1000px;
    border: 1px dashed gray;
    visibility: hidden;
    color: black;
    text-decoration: none;
    }
    Sry but i think with CSS hover image you can't center all the image becoz of using position: absolute. I think you should try a click CSS Gallery such as this:

    http://www.cssplay.co.uk/menu/gallery_click.html

  5. #5
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Each image pops up approximately in the...

    center of the page in my browser. (I still use Windows XP and IE6 because most of my viewers use that.)

    I do see a problem, however. There are 6 photos which can be selected.
    But it is very difficult to select one which is not on a corner. You have to approach the photo carefully from the correct angle to get one of the inside photos to appear in the center.

    I would suggest spacing the 6 images far enough apart horizontally and/or vertically so that visitors can hit the one they want easily.

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
  •