php search result images show across and fill a CSS div <p>I'm using dreamweaver and php to return a list of images based on search critiera. I have used Dreamweaver's repeat function and can get the images to repeat below each other (as below). </p> <pre><code>&lt;table width="100" height="38" border="1"&gt; &lt;?php do { ?&gt; &lt;tr&gt; &lt;td width="38"&gt; &lt;img class='example' src="images/&lt;?php echo $row_getresult['image_name']; ?&gt;.png"/&gt;&lt;br&gt; &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;?php } while ($row_getamenityaccommodation = mysql_fetch_assoc($getamenityaccommodation)); ?&gt; &lt;/table&gt; </code></pre> <p>How can I get the images to go across from each other within a CSS Div e.g. float:left; width:45%; so that if there are more images than what would fit in 45%, the images would continue onto a new line?</p> <p>Would somehow 'printing' the array work?</p>