Results 1 to 2 of 2

Thread: PHP Photo Album script - vertical and horizontal alignment

  1. #1
    Join Date
    Aug 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question PHP Photo Album script - vertical and horizontal alignment

    1) Script Title: PHP Photo Album script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...photoalbum.htm

    3) Describe problem: I am testing the above and I've hit a problem. I want to use the script to display smilies (many animated gifs) I have the script working OK, I have added my own html content etc. where I am stuck is here

    Code:
    var curimage=0
    for (y=0; y<dimension.split("x")[1]; y++){
    for (x=0; x<dimension.split("x")[0]; x++){
    if (curimage<galleryarray.length)
    document.write('<div id="slide'+curimage+'" class="slideshow"> '+buildimage(curimage)+'</div>')
    curimage++
    }
    document.write('<br style="clear: left" />')
    }
    
    }
    Smilies are not all the same height or width so I would like to align them in the center and vertically align them to the bottom. I have attached a screenshot of what I have, the border was added to troubleshoot.
    Last edited by Nokonium; 08-05-2006 at 08:29 PM.

  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

    Hard to test out seeing as it is PHP driven but, I would try replacing this:

    Code:
    document.write('<div id="slide'+curimage+'" class="slideshow"> '+buildimage(curimage)+'</div>')
    With this:

    Code:
    document.write('<table class="slideshow" id="slide'+curimage+'"><tr><td align="center" valign="bottom">'+buildimage(curimage)+'</td></tr></table>')
    A link to your page might help me to troubleshoot this if there are any problems.
    - 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
  •