Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Vertically Divide A Web Page Without Using A Table?

Tags:

html

tabular

I read somewhere (on Stack Overflow as a matter of fact!) that it's a bad idea to use tables to layout pages in html.

I have an HTML page that needs to be "divided" down the middle with some content going on the left and some content going on the right. At fist I would have thought to use nested tables with each of their widths being 50%. Can I do the same thing using div? Or some other html construct?

like image 582
Jan Tacci Avatar asked Nov 08 '12 13:11

Jan Tacci


1 Answers

<div style="float:left; width:50%;">
Left  <!-- Set Div As your requirement -->
</div>
<div style="float:left; width:50%;">
Right  <!-- Set Div As your requirement -->
</div>
like image 61
Akhil Avatar answered Sep 28 '22 00:09

Akhil