Thursday 14 November 2013

Side by side DIV

This is one of the things I just can't remember and I have to google it every time. But it is so simple. Side by side DIV.

Here is some css to go with the div
#leftcolumn { width: 300px; border: 1px solid #333333; float: left;}
#rightcolumn { width: 300px; border: 1px solid #333333; float: right;}
.clear { clear: both;}

And for the div's

<div id="leftcolumn"><p>some text here</p></div>
<div id="rightcolumn"> <p>more text here</p></div>
<div class"clear"></div>

Yes, quite simple and next time I know where I find this.