Skip Navigation

[Resolved] I want to have a max-height for woocommerce product image gallery. Where to do?

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by martinR-10 6 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#1130492

I have added the product image gallery of woocommerce to my layout, but I noticed, that there are also vertical images to show, which will extensively expand the hight of the whole gallery.

i.e. see hidden link

So I would like to have a max-height for the gallery, but I don't know where to do. I already tried to have a div arround the gallery which is 500px of max-height, but then the images are only cutted instead of wrapped.

Could you please give me a hint, how I could configure toolset right to get a nice woocommerce image gallery which has a maximum height?

Thanks well!

#1130661

Hi Martin,

Thank you for contacting us and I'll be happy to assist.

Although, 1-1 custom CSS code is beyond the scope of support that we provide, but we do our best to guide in the right direction, whenever possible.

To make sure the height of the main gallery image area, remains the same and image inside it has a maximum height of 500px, you can use following CSS code:


.single.single-product .woocommerce-product-gallery__image.flex-active-slide {
	min-height: 500px;
}

.single.single-product .woocommerce-product-gallery__image.flex-active-slide a img {
	max-height: 500px;
}

For a more personalized and detailed assistance around custom code, you can consider consulting, one of our certified consultants:
https://toolset.com/contractors/

I hope this helps.

regards,
Waqar

#1132554

My issue is resolved now. Thank you!