I am trying to have flexbox elements move to be right underneath the element on top of it, but I cannot figure out how. Is there a way to do this? Each of the elements is supposed to be adaptive, but the spacing is always the same.
Please use the full-screen on the snippet!
.container {
margin: 0 auto;
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: center;
align-items: flex-start;
}
.container div {
width: 25em;
min-height:75vh;
text-align: center;
position: relative;
min-height:100px;
padding: 5px;
margin: 2em;
background-color: red;
border-radius: 0.6em;
margin-top: 0em;
flex-direction: column;
display: flex;
justify-content: center;
}
<div class="container">
<div>
<p>Hi man</p>
<p>Hi man</p>
</div>
<div>
<p>Hi man</p>
<p>Hi man</p>
<p>Hi man</p>
<p>Hi man</p>
</div>
<div>
<p>Hi man</p>
<p>Hi man</p>
<p>Hi man</p>
</div>
<div>
<p>Hi man</p>
</div>
<div>
<p>Hi man</p>
<p>Hi man</p>
</div>
<div></div>
</div>