PDA

View Full Version : Building 3 Boxes on the Same Line



mamamia
Apr 15th, 2007, 03:51 AM
Hi All,
This should be an easy one I think....

I'm trying to build 3 bordered boxes, of equal width, on the same line using a DIV tag and CSS. Very similar to a table that would contain 1 row (TR) and three cells (TD).

I am having a hard time doing this because I can't seem to get them to horizontally line up (on the same line). I've played with the position and float properties a bit, but to no avail. Any help would be appreciated.

mamamia

Arbitrator
Apr 15th, 2007, 04:12 AM
div { float: left; border: 1px solid; }

<div>D1</div>
<div>D2</div>
<div>D3</div>