Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Apr 2008
    Manila, Philippines
    Thanked 12 Times in 12 Posts

    adjust height automatically.

    Hi guys,

    I'm gonna ask this one out now.. i've been doing all the tricks i can get. but still no go..

    here's the page.. http://rex-turner.com/ohs69/caption_gallery.php

    my question is.. how do i get the <li>to automatically adjust the height.. so that it will line up properly.. cause at the moment... i don't have a fixed height for my li... so its all honked up...

    I have been testing some stuff.. but the only thing that work is by fixing the height of my list... to make them line up properly... but i get a huge gapping spaces... i wish to minimize them...

    I'm on and off with php.. cause i specialize in design more than coding.. so a little enlightenment would be great..


  • #2
    Regular Coder funnymoney's Avatar
    Join Date
    Aug 2007
    Thanked 24 Times in 24 Posts
    adjusting how it looks is not PHP issue.

    website design is done by HTML/CSS technique, and in some cases Javascript one.

    if you want to set li height you need to add CSS that will set that height..

    PHP Code:
    li style="height: 20px; background: #cccccc">Test Li</li>

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    In a place far, far away...
    Thanked 1,043 Times in 1,019 Posts
    What you could do is loop through all of your images and use getimagesize to find the heights of each image and then store the largest height. after doing that you can set that same height on all of your li elements.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


    Posting Permissions

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