Product thumbnail image height in category/list view woocommerce

Posted in: Newspaper
Post count: 97

Hello,

I have changed image sizes, or corrected them for products and regenerated the thumbnails but it’s still displaying products with massive height images as well, massive.

So the height:auto is not working but if I set it to height:200px as below:

.woocommerce ul.products li.product a img {
height: 200px;
}

It works… but it distorts the image.

If you can please help me to set thumbnail to max 200px and the bit of css that will help prevent it distorting.

Thank you in advance

Post count: 97

Sorry, this is an example link

southafricanshop .com /buy/liquor-store/beer-cider

you will see the image all different sizes and as it’s bottles, well, they huge instead of all organised.

Post count: 7909

Hi,

This depends the size of your image and unfortunately there is not a css code to work well on all images like you already find out, sorry!

Thanks!

Post count: 97

Ok thanks. It is a bit of a pain as products (some) have huge images both on product view and on the list/category view. The hunt goes on for a solution otherwise will have to re-do all the images.

Thanks

Post count: 97

I solved it for the products and list woohoo! (or so I think)

The default is width:100% for both, so I changed it to:

PRODUCT VIEW:

.woocommerce div.product div.images img {
width: auto;
}

CATEGORY / LIST VIEW:

.woocommerce ul.products li.product a img {
width: auto;
}

IT WORKED!!! (for some strange reason, I solved it hahaha)

  • This reply was modified 10 years by tripledm.
Post count: 22421

Glad you solved it and thanks for posting the solution. It will help other users that encounter this issue.
Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.