Site logo

[Resolved] Why there is no bottom margin on post images and how I add it?

Home Forums Support [Resolved] Why there is no bottom margin on post images and how I add it?

Home Forums Support Why there is no bottom margin on post images and how I add it?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2451098
    Pintu

    Hi there, my post images have no bottom margin and the images are very close to the underneath paragraph.

    See here https://ibb.co/C1hn4mw

    So, how can I add some spacing under every post image, and why was there no bottom spacing for the images in the first place?

    I’ve added my site link in the private section, please help.

    #2451102
    Fernando
    Customer Support

    Hi Pintu,

    It’s a WP 6.1 issue. See David’s response here: https://generatepress.com/forums/topic/no-spacing-beneath-images-in-a-post/#post-2417991

    Can you try adding the code provided by David the through Appearance > Customize > Additional CSS and let us know how it goes?

    #2451105
    Pintu

    Hi Fernando,

    The CSS worked only for the images that Align is set to “None” and those images are “Align center” not worked with that CSS.

    You can see what I’m talking about by seeing the images of the page I’ve added in the private section. On this page the first image align is set to none and other images are aligned center.

    Could you please give a fix for this problem.

    #2451107
    Fernando
    Customer Support

    I see. Can you try this instead?:

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

    Now the images that Align is set to “None” is not working.

    #2451117
    Fernando
    Customer Support
    #2451126
    Pintu

    Hi, your updated code worked. Also, I’ve tried this code

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

    And it worked too.

    So, which CSS do you recommend?

    #2451129
    Fernando
    Customer Support

    Good catch – if your code works, that would be better. It’s shorter and accounts for less redundancy. So, I would recommend that.

    #2451133
    Pintu

    Thanks, Fernando marking this as resolved 🙂

    #2451139
    Fernando
    Customer Support

    You’re welcome, Pintu! 🙂

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