.right {
display: flex;
background-color: yellowgreen;
}
.left {
display: flex;
background-color: yellow;
}
.container {
display: flex;
background-color: brown;
justify-content: space-between;
}
<div class="container">
<div class="temp">
<div class="right">right</div>
<div class="left">left</div>
</div>
</div>
If I remove div with class name "temp" then the right and left div appear at right and left corner of the screen.
But if I keep the div "temp" then the right and left div appear one below another.'