ngFor
generated card stacked on each other instead of remain in a row.
I am generating cards through ngFor
. I am using fxFlex="30"
for each card but they stacked on each other. I used flex-wrap
also but didn't work.
<div fxFlex *ngIf="designs" [@expand]>
<div fxLayout="column" fxLayout.gt-sm="row" style="display: inline" *ngFor="let design of designs">
<div fxFlex="30">
<mat-card>
<mat-card-header>
<mat-card-title>
<h2>{{design.label}}</h2>
</mat-card-title>
<mat-card-subtitle>
<h3>{{design.time}}hr</h3>
</mat-card-subtitle>
</mat-card-header>
<img mat-card-image src="{{BaseURL + design.image}}">
<mat-card-content>
<p>{{design.description}}</p>
</mat-card-content>
<mat-card-actions style="margin: auto;">
<button mat-stroked-button routerLink="/contact" color="primary">Book Now</button>
</mat-card-actions>
</mat-card>
</div>
</div>
</div>
I want my generated cards should be in a row. But in actual they stacked on each other.