Padding below image

i’ve tried the following css to remove the padding that appears below the images at the top of this page of my site:

img {
    margin-bottom: 0 !important;
}

.x-img  {
  margin-bottom: 0px !important;
}

.aligncenter {
    margin: 0 auto !important;
}

please see screenshot example here: https://imgur.com/a/dLm5Y

I’ve also tried adding “man” and “mbn” classes to image cornerstone elements… still not working, though I noticed it works when standard body text is linked, but not when using this h class below, which is the style I prefer:

"pt-cv-title"

I tried adding custom CSS to this particular class to remove the padding above/below (for example, this code below) but it doesn’t seem to fix the issue:

.pt-cv-title {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

any idea how to fix? thanks

Hi there,

Please add the mbn class to the <p> tag that wraps the images like this:

<p class="mbn"><a href="/literature/vegetarian-starter-guide/" title="" style="outline: none;"><img src="http://tryvegdev.wpengine.com/wp-content/uploads/2018/01/veg-starter-guide.png" alt="" width="286" height="368" class="aligncenter size-full wp-image-2699"></a></p>

Hope this helps.

ah, perfect! thanks for the tip, working now.

Glad we could help.

Cheers!

As a note to self (and anyone else who stumbles on this thread in the future) for this to work the following code was also needed in customizer > css:

img {
    margin-bottom: 0 !important;
}

Thanks for sharing it as well :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.