1
I’m trying to align a grid as follows: 3 columns x N rows
<div class="row" style="margin-top: 150px;">
@forelse($models as $model)
<div class="col-md-4" style="margin-left: 5px;">
<div class="row card">
<a href="#">
<div class="col-md-12 card-img"
style="background-image: url(''); background-size: 100% 100%;">
</div>
<div class="col-md-12 card-container">
<h4 class="text-center"><b>{{$model->name}}</b></h4>
</div>
</a>
</div>
</div>
@empty
<h2>Não existe modelos cadastrados ainda.</h2>
@endforelse
</div>
All this code is inside a father div <div class="container"></div>
However, the result he’s returning to me is this
Since how I’m using the col-md-4
inside a Row that is col-md-12
sure would be if he had 3 cards on each line and centered.
- Any idea where I might be going wrong?