[wd_asp elements=’search’ ratio=’100%’ id=1]

Align ‘Add to Cart’ product buttons – WooCommerce

12th January 2021

WooCommerce

woocommerce category codehaven

This problem should be sorted by Woocommerce but they still have the problem. when you have to redesign a website that has weird image sizes and you cant really do much about that, you need to find a way to align all the buttons so they look neat. The only way I have found that suits me is force the product title to have only 2 lines. The below code works for me.

BEFORE


/* Force 2 lines */
.woocommerce ul.products li.product h2 {
line-height: 2.5ex;
height: 6ex; /* 2.5ex for each visible line */
overflow: hidden;
}

AFTER