Hi,
I'm querying through a database and creating a div for every result using a while loop:
PHP Code:
while($row = mysql_fetch_array($result))
{
echo "<div id='search_results'><h3>" . xml_encode($row['comment']) . "</h3>";</div>
}
My problem is that I want my div height to vary depending on the size of the comment. I tried adding a style='height:auto' to both the div itself and also in the CSS but it won't make the div height change for larger comments.
Does anyone know how to get auto div heights in php while loops?
Cheers,
Pierre