Site logo

Archived topic

Wrong 'frame' size on single product images

5 replies · Started by David Bennett on February 6, 2023

Viewing posts 1–6 of 6

Hello
For a little while now, I have noticed that the 'frame' that specifies the single product dimensions on my WooCommerce site at Flying Twigs, The 'frame' has a 'extra' band of unused space at the bottom - such that the image is not covering all the frame.You can see it in this image of a RED DEER for example.

Can you tell me what is causing this? I have looked at my CCS and cannot see anything.

Thanks

David

Hi David,

I've not seen this issue before and can't quite tell why that's the case either.

The product image/gallery should be all handled by WooCommerce itself so I don't believe it's caused by the theme - I could be wrong though.

Can you try #1 here in the debugging article here first - keep WooCommerce activated of course:
https://docs.generatepress.com/article/debugging-tips/

If that doesn't help, can you try #4 in the same article?

Hi Leo,

Thank you for your help.

#1 in the debug didn't help.

#4 solved it.

I am using a child theme of GeneratePress. It occurred to me to reactivate GeneratePress using the parent theme.

Using the parent theme, the issue resolved itself.

I cloned the site at devi.flyingtwigs.com and I replaced the child theme with the version from here

https://generatepress.com/forums/topic/child-theme-download/

Out of interest, I have a functions file in the child theme - one bit of PHP to move the secondary nav to the bottom of the page, and the other to restrict search to products only - I didn't bother to override/replace the functions file when I uploaded the replacement child theme - and the issue is still there.

You can see the difference in these two pages

Dev site with parent theme - https://devi.flyingtwigs.com/product/truth/
Main site with child theme - https://www.flyingtwigs.com/product/truth/

David

Hi there,

its this CSS in your child theme:

/* to re-space after WP 6.1 */
    figure img {
        margin-bottom: 1.5em;
    }

its affecting woo images too.
Add this CSS to remove it from woo images:


.woocommerce div.product div.images img {
    margin-bottom: 0;
}

Thanks David,

I missed that that might be causing it.

I'll mark this resolved.

Kind regards,

David

Glad to be of help

This archived topic is closed to new replies.