when i set float to right for container this overlapping occurrs, what is reason for this how to avoid it? i want yellow div to below the red one and red one should be at right ...
.container {
float: right;
height: 150px;
margin: 10px;
width: 50%;
display: flex;
flex-direction: row;
/* flex-wrap: wrap; */
justify-content: center;
align-items: center;
background-color: yellow;
}
<div class="container"></div>
<div style="display: block; margin: auto; background-color: red; height: 200px; width: 100%;"></div>
