I'm a beginner to all of this and I am trying to get these product cards to be equal in height. I have gone through multiple websites and posts trying to edit but to no avail. I think the problem is because of the different number of lines of the title of the products - the titles which take up the same number of lines are equal height. However, I need all the product cards to be equal. What can I do?
#content {
padding-left: 25px;
}
.single {
width: 290px;
}
@media(max-width:768px) {
.single {
width: 60%;
margin: 0 auto;
}
}
#content .product {
background: #ffffff;
border: solid 1px #e6e6e6;
margin-bottom: 30px;
box-sizing: border-box;
}
#content .product .text {
padding: 10px 10px 0px;
}
#content .product .text p.price {
font-size: 18px;
text-align: center;
font-weight: 400;
}
#content .product .text .button {
text-align: center;
clear: both;
}
#content .product .text .button .btn {
margin-bottom: 10px;
}
#content .product .text h3 {
text-align: center;
font-size: 20px;
}
#content .product .text h3 a {
color: rgb(85, 85, 85);
}
<div class='col-md-4 col-sm-6 center-responsive'>
<div class='product'>
<a href='details.php?pro_id=$pro_id'>
<img class='img-responsive' src='admin_area/product_images/$pro_img1'>
</a>
<div class='text'>
<h3>
<a href='details.php?pro_id=$pro_id'> $pro_title </a>
</h3>
<p class='price'>
₹$pro_price
</p>
<p class='button'>
<a class='btn btn-default' href='details.php?pro_id=$pro_id'>
Details
</a>
<a class='btn btn-primary' href='details.php?pro_id=$pro_id'>
<i class='fa fa-shopping-cart'></i> Add To Cart
</a>
</p>
</div>
</div>
</div>
Everything on the webpage is enclosed in a <div id="content">
Also, if someone could let me know how to add CSS styling properly (unless this is the right way), I'd greatly appreciate it.
Thank you!