The float property determines if a box (an element) should float.
Note: When elements are absolutely positioned, they do not adhere to the float property!
left This will make the element float to the left.
right This will make the element float to the right.
.align-left{
float: left;
}
.align-right{
float: right;
}
Here is an example in your HTML File:
<div>
<button class="align-left">xx</button>
<button class="align-right">yy</button>
</div>
Alternatively, you can also apply it directly with inline CSS.
<div>
<button style="float: left;">xx</button>
<button style="float: right;">yy</button>
<div style="clear: both;"></div>
</div>