View Full Version : adjust height automatically.

09-02-2009, 12:58 PM
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.. :D


09-02-2009, 01:07 PM
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..

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

09-02-2009, 08:25 PM
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.