Paranoid Paranoid - 8 months ago 35
HTML Question

HTML, align two elements on both sides of the same line

Without using table, how can I align two elements (one at left, another at right) in the same line?


HTML content :
<div class='container'><div class="align-left">left</div><div class="align-right">right</div></div>

Style as shown below

.container{ width:100%; }
.align-left{ float: left;width:50%; } .align-right{float: right;width:50%}