I am trying to create a cart page for an eCommerce site and I want all the items in the cart to be shown in a table format. This is how I am going to present it:
I want the name, quantity and price of the product row to be in the middle of the container and I have tried to do this using align-content but it doesn't seem to work:
This is the html what is wrong?
.productRowContainer {
/* holds the products added from the cart */
width: 100%;
height: 196px;
}
.cartItemContainer {
width: 25%;
float: left;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
.dataContainer {
width: 100%;
height: 22px;
}
<!-- Product Row (will be repeated) -->
<div class="productRowContainer">
<!-- holds labels for cart -->
<div class="cartItemContainer">
<img src="{{ asset('img/iamlush/shop/ShopDark.jpg') }}" style="width: 60%;">
</div>
<div class="cartItemContainer">
<div class="dataContainer">
<p>Name</p>
</div>
</div>
<div class="cartItemContainer">
<div class="dataContainer">
<p>Quantity</p>
</div>
</div>
<div class="cartItemContainer">
<div class="dataContainer">
<p>Price</p>
</div>
</div>
</div>