I am trying to make a product page and have been playing around with different configurations in Bootstrap 4 and almost have it perfect now, but I just have one small problem.
Basically I am using the below code:
<div class="row row-spacing">
<div class="col-sm ml-2 mb-2 product_cell">
<img class="product_image" src="images/products/coke_can.png">
<hr>
<p class="product_name" style="text-align: center">Coca Cola 300 ml</p>
<p class="product_price">€0.80</p>
</div>
<div class="col-sm ml-2 mb-2 product_cell">
<img class="product_image" src="images/products/coke_can.png">
<hr>
<p class="product_name" style="text-align: center">Coca Cola 300 ml</p>
<p class="product_price">€0.80</p>
</div>
.... ....
</div>
The products come out (almost) perfect like below:
However, the last products on the last line always try to stretch out to the full width of the page, I don't want this, I want each product to be exactly the same width and height. How do I fix this?
I am using various screen sizes, from iPads to desktop PC's so I don't think I can hard code how many products will appear on a single row, I need bootstrap to dynamically decide the widths and how many it will fit and then make sure they are all equal widths.