I'd like to have a horizontally and vertically centered cards. I've done it like this.
*{
margin: 0;
padding: 0;
}
.wrapper{
background-color: darkkhaki;
width: 700px;
height: 700px;
}
.cards{
display: flex;
justify-content: center;
align-items: center;
}
.card{
width: 100px;
height: 250px;
background-color: chartreuse;
border: crimson 2px solid;
}
<div class="wrapper">
<div class="text">
<p>Lorem ipsum</p>
</div>
<div class="cards">
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
</div>
</div>
However, the vertical center doesn't occur (just the horizontal).
The same happens when I try it with the "text" class.
Thank you for your help :)