I am currently developing a web application using Angular, and I've encountered an issue while trying to display cards in a vertical layout rather than horizontally. My goal is to have the cards fill up the first column (5-6 cards) before moving on to populate the second column. Here's a snippet of my code:
presentations = [1,2,3,4,5,6,7,8]
<div class="row card-data">
<div class="col-4" *ngFor="let presentation of presentations">
<mat-card>
Card content here
</mat-card>
</div>
</div>
.card-data {
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
Currently, the cards are being displayed as rows instead of columns. What adjustments can I make to fix this issue?