In this article, we will discuss how to place 3 DIV side by side using CSS.You need to have a container with a width greater than the sum of the widths of the all the 3 DIV elements. For this purpose, we have kept width of the container element as 520px and the individual DIVs as 170px. Use the float as left, the DIVs will be arranged side by side.
If the page is to be expanded in the future, the sizes need to be re-adjusted. So, it is advisable to use percentage (%) instead of px for the DIVs.
<div style="width: 520px;">
<div style="float: left; width: 170px;">Left DIV</div>
<div style="float: left; width: 170px;">Middle DIV</div>
<div style="float: left; width: 170px;">Right DIV</div>
<br style="clear: left;" /></div>