I am currently utilizing bootstrap 4
and have a list of items that I am displaying in the following manner:
<div class="container">
<div class="row">
<div class="card col-md-4 col-sm-6 col-12 item-wr" *ngFor="let item of items">
...
</div>
</div>
</div>
When viewing on my desktop using Google Chrome, I can see 3 items in a row but there is no spacing between the columns. To resolve this issue, I added the class item-wr
.
.item-wr {
margin: 10px;
}
However, with this adjustment, the layout breaks and I am only able to see 2 items per row, with some space on the right side of the row.
How can I maintain 3 items per row col-md-4
with space in between them?
P.S. I do not want any space at the beginning or end of each row. The first column of each row should not have a margin-left
, and the last column of each row should not have a margin-right
.