Paranoid Paranoid - 1 year ago 57
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?

Answer Source

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%}