Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: adjust height automatically.
09-02-2009, 12:58 PM #1
- Join Date
- Apr 2008
- Manila, Philippines
- Thanked 12 Times in 12 Posts
adjust height automatically.
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..
09-02-2009, 01:07 PM #2
adjusting how it looks is not PHP issue.
if you want to set li height you need to add CSS that will set that height..
<li style="height: 20px; background: #cccccc">Test Li</li>
09-02-2009, 08:25 PM #3
- 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.