With a flex container and flex-wrap: wrap set you can align overflowing items to the center using justify-content: center.
Is there a way
Not the way you want with flex. You have to be precise with CSS-Grid,
Grid
item
item
item
item
item
item
item
.container-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
.item {
background: red;
border: 1px solid;
}
.item-mid{
background:purple;
grid-column:2/1;
}
Also, look here,
Centering in CSS Grid
(this is not wrapping, however)