There currently is no way to get a DIV to shrink
to the size of it's contents. Maybe in CSS 3???
Tables are already smart enought to do that trick.
Boxes with DIV
Boxes with Tables
Code
<h2>Boxes with DIV</h2>
<div style="border:3px #0F0 solid;">
<div style="height:100px; width:100px; background-color:fuchsia; float:left"> </div>
<div style="height:100px; width:100px; background-color:green; float:left"> </div>
<div style="height:100px; width:100px; background-color:maroon; float:left"> </div>
<div style="clear:left; height:0px"> </div>
</div><br/>
<h2>Boxes with Tables</h2>
<table style="border:3px #0F0 solid;" cellpadding="0" cellspacing="0">
<tr>
<td style="height:100px; width:100px; background-color:fuchsia"> </td>
<td style="height:100px; width:100px; background-color:green"> </td>
<td style="height:100px; width:100px; background-color:maroon"> </td>
</tr>
</table>