If I do justify-content: center;
cards are centered, but it looks quite rough if there aren't an even number of cards. So, I did justify-content: flex-start;
and now I need to center them while are aligned left, I don't want the negative space, is it possible to do so with flexbox?
<section>
<div class="wrap">
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
</div>
</section>
section {
width: 100%;
display: flex;
justify-content: center;
}
.wrap {
display: flex;
flex-wrap: wrap;
width: 80%;
justify-content: flex-start;
}
.card {
width: 300px;
height: 200px;
}
Want it like this:
Instead of this: