How can I add a margin to product images in a card?

Hi guys,

I am adding products to my webshop and encountered an issue. For the product cards, I work with png photos. However, whenever I upload them these photos fill in the whole product card (see photo attached). I would like to add margin around the png photos in order to make them appear smaller on the product card. I couldn’t find the code to be adjusted.

I use the Mode theme.

Thanks in advance.

Regards

Hi @FF3 ,

Could you share your store URL so I can check and give you a solution?

@FF3 - can you please share your page link?

Hi Dan_From_Ryviu,

Thanks for your quick response. Our website is not published yet. Unfortunately, I am not allowed to share the URL and password at the moment due to legal reasons.

Is there any chance to solve this issue without access to the whole website? Or can I provide any additional screenshots that make this case clearer?

Thanks

Hi Suyash1,

Thanks for your quick response. Our website is not published yet. Unfortunately, I am not allowed to share the URL and password at the moment due to legal reasons.

Is there any chance to solve this issue without access to the whole website? Or can I provide any additional screenshots that make this case clearer?

Thanks

@FF3 - can you share preview link then? because code needs to be seen to provide css

@suyash1 I quicly changed the website design in order to provide a preview.
You can find the preview here.

Thanks

@FF3 - add this css to the very end of styles.css file and check

.template-index .product-list .inline-image__image {width: 90%;    height: 90%;}

@suyash1 I added the code and it didn’t have the desired effect. The right and bottom are fine, but the right side and top aren’t. Is there some code that I can add to make the margin appear on all four sides?

thanks

@FF3 - try this, adjust numbers as per the need

.template-index .product-list .inline-image__image {width: 90%; height: 90%; left: 50%;
    transform: translate(-50%) !important;    top: 10%;}

@suyash1 Fantastic, it worked! Thanks a lot

@FF3 - great, do let me know if you ned any thing more, you can message here or have my email below