4
You can use the properties and values display: flex and Justify-content: space-between in the father div
.divPai {
width: 100%;
display: flex;
justify-content: space-between;
}
<div class="divPai">
<button> Esquerda </button>
<button> Direita </button>
</div>
Thus the items are distributed evenly on the line; the first item is rendered at the beginning of the parent element, and the last item at the end of the parent element. If there are more than two elements the spacing between the others will always be equal.
If you want to see more about flexbox this guide is very complete:
I think that’s it msm, thanks
– Matheus Henrique
@Bloodplus think you should look at the solution with flexbox, mainly because flexbox is something that should be studied, are much more options to deal with. You can think of flexbox as an evolution from float to layout
– evandrobm