My main div covers the entire website. Within it, there are two smaller divs, both with the CSS property float: left. The left div is shorter in height than the right one, causing the content of the right div to overlap onto the left div when its length exceeds the height of the left div. I attempted using position: absolute, but it did not solve the issue. For more clarity on my problem and desired outcome, please refer to the image provided here.
.left-div {
margin: 25px;
float: left;
}
.right-div {
float: left;
margin: 25px;
justify-content: center;
}
<div className="main-container">
<div className="left-div" /> content of left div
</div>
<div className="right-div">
content of right div
</div>
</div>