I am currently designing a cart page for an online store, and I have decided to showcase all the items in the cart using a table format. Here is my plan:
https://i.sstatic.net/PJBpo.jpg
My goal is to have the name, quantity, and price of each product displayed in the center of the container. However, my attempts to achieve this with align-content have not been successful:
Could you please review the HTML code and identify what needs to be corrected?
.productRowContainer {
/* This container holds the products added to 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 (to be repeated for each item) -->
<div class="productRowContainer">
<!-- Container for product image -->
<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>