I have the below code for getting results from my mysql database:
[code]
while ($row = mysql_fetch_assoc($result)) {
$id = $row[‘id’];
$name = $row[‘name’];
$description = $row[‘description’];
$price = $row[‘price’];
$image = $row[‘image’];
?>
<div class=”listings”>
<div class=”column1″>
<img src=”<?=$image;?>” width=”150px” height=”150px” alt=”<?=$name;?>” />
<br />
<h4><?=$name;?></h4>
<p>
<?=$description;?>
<br />
<strong>Price:</strong> $<?=$price;?>
</p>
<div style=”width:150px; “>
<div style=”float:left; width:75px;”>
<p>
<a href=”update_product.php?catg=<?=$catg;?>&product_id=<?=$id;?>”>Edit</a>
</p>
</div>
<div style=”float:right; width:75px;”>
<p>
<a href=”delete_product.php?product_id=<?=$id;?>”>Delete</a>
</p>
</div>
</div>
</div>
</div>
<?
}
// Free the resources associated with the result set
// This is done automatically at the end of the script
mysql_free_result($result);
mysql_close($connect);
?>
This shows fine on some browsers, but on some, like IE7, and some IE6 browsers, it shows all in 1 column down the left side. I need it to show 3 columns wide, like a table would with a <tr><td>item1</td><td>item2</td><td>item3</td></tr>, etc. How would I go about doing this? If I should convert it to a table, ok, but how do I get it to have 3 columns, then start a new row with 3 columns, etc.?
Thanks