I've seen a couple similar questions, but none of them seem to address cards that are generated. My goal is to have 4 or less cards per row, at a fixed height/width. Below is the code I currently have:
<div class="container">
<div class="card-deck">
@foreach (var item in Model)
{
<div class="card shadow">
<div class="card-title pl-4 pr-4 pt-3">
<h4><a class="stretched-link deco-none font-weight-bold" asp-controller="Home" asp-action="TrainingDetails" asp-route-id="@item.TrainingId">@Html.DisplayFor(modelItem => item.Title)</a></h4>
</div>
<div class="card-body overflow pl-4 pr-4 pb-2">
<div class="font-weight-bold text-secondary">
@Convert.ToDateTime(item.DateCreated).ToString("MM/dd/yy")
</div>
@Html.DisplayFor(modelItem => item.Description)
</div>
<div class="card-footer">
<div class="text-center text-muted training-footer">
@Html.DisplayFor(modelItem => item.Topic.Topic)
</div>
</div>
</div>
}
</div>
</div>
Currently it puts all the cards on a single row, and each card itself is incredibly thin. What do I have to add to get it to break off into multiple rows of fixed size? Thanks for any help!