Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Lightbox problem in Safari

  1. #11
    Join Date
    Sep 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Found a fix for this Safari problem.

    In case anyone looks at this old thread, I wanted to post a fix that I created.

    I was also having this display problem in Safari -- some lightbox images would display larger than they should.

    In my case, my images were varied in size, but all had a maximum height of 620px. I inserted some css in the header of the pages that used the lightbox effect that constrained the max image height to 620px, and another line that set the width to auto. This style had to be in the header -- didn't work on a linked style sheet. Here's the code:

    #lightboximage {
    max-height: 620px;
    height: expression(document.body.clientHeight > 620? "auto": "620px" );
    }

    #lightboximage { width:auto;}

    Anyway, this fixed it for me. Cheers!

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

    Default this fix worked for me

    I used to have the same problem. It depends somehow on the resizing of the image when switching from a Portrait-oriented to a Landscape-oriented image (and viceversa).

    I edit the css in two points
    - the image container div (#imageContainer) by adding position: relative;
    - the image with a width of 100%
    #imageContainer img { width: 100%; }

    This last one casues every image contained in #imageContainer to be resized in order to fill the container itself.
    This was the solution but it had the side effect of an ugly resizing of the loading.gif image.

    So I added

    #imageContainer #loadingLink img { width: 20px; }

    with the exact (as it's known) size of the loading.gif image.

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
  •