Site logo

[Support request] No padding below images any more

Home Forums Support [Support request] No padding below images any more

Home Forums Support No padding below images any more

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2444426
    Matthew

    Hello,

    I switched to Generatepress a few months ago and don’t recall having this issue until recently.

    Basically, in a post there should automatically be some padding between any image and the text below it. Recently, all images in my posts have no padding below them.

    Example: redacted

    This isn’t the case inside the editor. I can resolve it manually by adding space but it should be automatic.

    Please help me resolve this.

    Thank you

    #2444532
    David
    Staff
    Customer Support

    Hi there,

    it happened in WP 6.1 where they moved HTML/Classes that applied the bottom margin.
    until we find a way to overcome their change without effecting everyones sites who don’t have an issue you will need to add some CSS:

    
    figure {
        margin-bottom: 1.5em;
    }
    
    #2446070
    Matthew

    Thank you David.

    That code only appears to relate to the featured image as the remaining images still have no lower padding (please see same example).

    Can you kindly let me know the CSS to apply to all post images?

    #2446089
    Fernando
    Customer Support

    Hi Matthew,

    Can you try updating the code provided to this?:

    .wp-block-image figure {
        margin-bottom: 1.5em;
    }

    Let us how it goes.

    #2446248
    Matthew

    Hi Fernando,

    That seems to work for most images but interestingly now the featured image in the above example is displaying without padding for me. I’ve tried clearing the cache and different browsers. Is it working for you?

    Some images on my site still don’t have the padding for some reason but most do.

    #2446263
    Fernando
    Customer Support

    I see. Can you provide the link to a specific post where the code isn’t working for the featured image and some other images?

    You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2446472
    Matthew

    Hi Fernando,

    I have provided links in the private section.

    Thank you

    #2446525
    David
    Staff
    Customer Support

    Try this CSS to cover all bases:

    
    figure,
    .wp-block-image,
    .wp-block-image figure {
        margin-bottom: 1.5em;
    }
    #2446689
    Matthew

    That seems to have done the trick. Thank you both.

    #2446911
    David
    Staff
    Customer Support

    Glad to hear that !

    #2530554
    Michael

    Is this still the fix? I updated yesterday and it screwed up SOME of our images. But not all. This bandaid fixed it but it’s causing other issues. It is now pushing down out affiliate disclosure block that will tuck up below the first image (not the featured, as it is not displayed, but the first in content image).

    It’s probably fixable by giving the affiliate disclosure (it’s a reusable block) it’s own CSS Class and custom CSS, but 1) I don’t feel like trying to figure it out and 2) just seems “unnecessary.”

    #2530720
    Leo
    Staff
    Customer Support

    Hi Michael,

    WordPress keeps on changing things so it’s difficult for us to keep up.

    Can you start a new topic and link me to the page(s) in question?

    We can take a look to see which CSS would work the best in your case.

    Thanks!

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