• Not sure if I missed anything while searching, but I have not been able to come up with any solution.

    I am trying to find a way to decrease the space in between images (top and bottom) in blog posts only (not in pages).

    Is it something that is as simple as a line of CSS?

    In case it is helpful: https://ryanlamphotography.com/blog/

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Firstly that is a lot of images for one display, took forever to load, is this what you want your clients to experience ?

    You need to install and use a browser inspector, it will show how your html and css are working.

    It is best practice when making css style changes like this to either use a custom css method (some themes provide this, there is also a plugin) OR use a child theme, details here:
    creating a child theme https://codex.www.ads-software.com/Child_Themes

    The first css you need is:

    .blog .entry-content img {
        margin: 0 0 0 0;
    }

    There is also a border setting you may want to reduce.

    iShouvik

    (@shouvikmukherjee)

    Hello Ruanlam,
    You are right, you need to use CSS for this. It can be achieved using pure HTML too but CSS is better.

    I went through your site and I think this is the code you wanna put in your style.css file.

    .type-post img {
      padding-top: 15px; // change it to your need
      padding-bottom: 15px; // change it to your need
    }

    Hope it helps.

    ~ Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS for image padding in posts’ is closed to new replies.