+ 1
Give me a solution 👇👇👇
i want to align two div with each other one is left and another one is right at same line.float property is not working what property i can put?
3 Respostas
+ 2
display:inline-block
+ 2
//By using display :inline-block to make div inline block and with left, right properties align div
<div class="div1">hello</div>
<div class="div2">hello</div>
<style>
.div1{
display:inline-block ;
position :absolute ;
right :0;
}
.div2{
display:inline-block ;
position :absolute ;
left :0;
}
</style>
0
Just add display:inline-block; and width
https://code.sololearn.com/WjVjeE5bTzT0/?ref=app