I am looking to create a grid layout that grows vertically, similar to the image in this link below: https://i.sstatic.net/phNM8.png
Is there a default layout option for vertical growth? Currently, I am using the display:grid
property.
.grid-container {
display: grid;
grid-template-columns: auto auto auto;
}
.grid-item {
text-align: center;
}
<div class="grid-container">
<div class="grid-item">item 1</div>
<div class="grid-item">item 2</div>
<div class="grid-item">item 3</div>
<div class="grid-item">item 4</div>
<div class="grid-item">item 5</div>
<div class="grid-item">item 6</div>
<div class="grid-item">item 7</div>
<div class="grid-item">item 8</div>
<div class="grid-item">item 9</div>
</div>
However, the current setup is growing horizontally instead of vertically.