Example: Use Flexwrap
Box 1
Box 2
Box 3
HTML
<div class="container">
<p class="box">Box 1</p>
<p class="box">Box 2</p>
<p class="box">Box 3</p>
</div>
CSS
.container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
background-color: yellow;
border: thin solid black;
width: 80%;
height: 200px;
}
.box {
background-color: aliceblue;
border: thin solid black;
width: 200px;
}