Site logo

[Support request] Adjust Spacing After Blog Post Images in Articles

Home Forums Support [Support request] Adjust Spacing After Blog Post Images in Articles

Home Forums Support Adjust Spacing After Blog Post Images in Articles

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2427757
    jal-mj

    The spacing after blog post images has changed with the last WordPress update. Now it has not any space. I have read in another thread that I can add this CSS:

    `figure img {
    margin-bottom: 1.5em;
    }

    It works well but not after youtube videos (I don’t know the selector of youtube videos).

    Besides it, if you write a description where WordPress says “Add caption” the margin is created before the description, and it should go after it, otherwise it looks strange.

    Screenshots:

    https://ibb.co/9GxFnX0
    https://ibb.co/bNPxvq1

    Thank you.

    #2427773
    Ying
    Staff
    Customer Support

    Hi there,

    For Youtube video, you can use this selector: figure.wp-block-embed.is-provider-youtube

    For the image blocks, try to use this CSS instead:

    figure.wp-block-image {
        margin-bottom: 2em;
    }
    #2427794
    jal-mj

    Is working for youtube, but not for images. 🙁 I must doing something wrong.

    #2427797
    Ying
    Staff
    Customer Support

    I can still see this CSS on your site:

    figure img {
        margin-bottom: 1.5em;
    }

    Can you link me to an article where I can see an image with the caption?

    #2427823
    jal-mj

    I don’t know how you are still seeing this. I have changed that with the code you sent me. I also have deleted cloudflare cache, etc.

    You can see the problem in the same page of the video, in the image above.

    #2427842
    jal-mj

    It seems it works well without figure:

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

    Is that possible?

    #2428080
    Ying
    Staff
    Customer Support

    Oh I see, some of your images are optimized by a plugin, it changes the figure to div.

    So, yes, this CSS should work for any element that has the .wp-block-image class:

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

    Just in case the video one doesn’t work either, simply remove the figurefrom the selector, so .wp-block-embed.is-provider-youtube it is.

    #2437803
    Anderson

    i was also out of space below the post images but your css solved my problem. thank you so much!

    #2439542
    Ying
    Staff
    Customer Support

    You are welcome Anderson 🙂

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