Site logo

[Resolved] Fixing the 0px margin under images for posts and pages

Home Forums Support [Resolved] Fixing the 0px margin under images for posts and pages

Home Forums Support Fixing the 0px margin under images for posts and pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2399471
    Anne

    Hello team,

    I’m using the Coach theme which looks gorgeous, but there’s one thing that’s off: there is a 0px bottom margin around images in posts and pages. I have added a link below with an example. How can I add a 15px margin only targeting those images? The problem with targeting the wp-block-image class is that it’s also used in other places like images on the homepage where I don’t necessarily want to add any extra margin around images.

    Thank you!

    #2399496
    Fernando
    Customer Support

    Hi Anne,

    To clarify, are you wanting to add a 15px margin-bottom to all images on single posts and pages except for the homepage?

    If so, try adding this CSS in Appearance > Customize > Additional CSS:

    body:is(.page,.single-post):not(.home) .wp-block-image {
        margin-bottom: 15px;
    }
    #2399499
    Anne

    Yes, that’s what I want to do – just tried it and it looks perfect! Thank you so much for the super fast reply 🙂

    #2399505
    Fernando
    Customer Support

    You’re welcome Anne! 🙂

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