Hello and welcome to our community! Is this your first visit?
Register
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
    Location
    Manila, Philippines
    Posts
    262
    Thanks
    3
    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..

    Andrew

  • #2
    Regular Coder funnymoney's Avatar
    Join Date
    Aug 2007
    Posts
    364
    Thanks
    17
    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:
    <ul>
     <
    li style="height: 20px; background: #cccccc">Test Li</li>
    </
    ul

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    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
    •