I would like to have two items aligned horizontally, but I don't know how to use flex to make them responsively separated:
<div class="container">
<div class="item-left">Left</div>
<div class="item-right">Right</div>
</div>
.container {
display: flex
}
The purpose is that no matter how I change the width of screen, they are still be separated (one on the left and another on the right). I can use grid
and justify-self
to achieve this, but how would I use flex to get this expected result?
Thank you!