I am trying to create a grid with 4 rows and 3 columns, where the last 3 rows are half the size of the full grid and centered horizontally below the 1st row. I have attempted different methods to achieve this, including using a nested grid, but so far none of them have been successful.
.user-header {
justify-content: center;
align-self: center;
}
.user-header .grid-header {
width: 46%;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: 15% 30% 30% 45%;
grid-gap: .2rem;
grid-auto-flow: row;
}
.grid-header-item {
display: flex;
justify-content: center;
align-items: center;
}
.grid-header-item:nth-child(10) {
grid-column: 1 / span 3;
grid-row: 4;
width: 100%;
display: block;
}
<div class="user-header">
<div class="grid-header">
<div class="grid-header-item">
Hey
</div>
<div class="grid-header-item">
Hey
</div>
<div class="grid-header-item">
Hey
</div>
<div class="grid-header-item">
Hey
</div>
<div class="grid-header-item">
Hey
</div>
<div class="grid-header-item">
Hey
</div>
<div class="grid-header-item">
Hey
</div>
<div class="grid-header-item">
Hey
</div>
<div class="grid-header-item">
Hey
</div>
<div class="grid-header-item">
Hey
</div>
</div>
</div>