1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

theme builder -> all blog posts -> increase space around image

Discussion in 'Free Divi Community Forum' started by cwly, Mar 1, 2021.

  1. cwly

    cwly Member

    Hey,

    I use the theme builder to style all my blog posts.
    I would like to increase the space between the picture and the text.

    This is how it looks right now: https://ibb.co/kXqwrnw
    You can see the "post content heading 4" being too close to the image.

    Thanks
     
    1. PRO MEMBER PERKS Beautifully crafted custom colored 'Digital Marketing' Divi layout for all Pro members:View Demo
  2. The image you are showing is only of the template that Divi outputs on the back end. What is it doing on the front end? What does it look like to the user?
     
  3. cwly

    cwly Member

    1. PRO MEMBER PERKS Divi Powerful Child Theme - Power up your Divi sites with tons of new functionalities & premade elements:Learn More
  4. Ok. So the image is part of the post. You would need to edit the actual post. Since it seems you don't want to use the Divi Builder on these pages, you do so by selecting the visual button on the text editor (or Edit As HTML in the block editor) and adding <br> anywhere you want an additional line break.
     
  5. cwly

    cwly Member

    sorry, I do use the Theme Builder. I use it for creating my blog post template.

    It looks like this:
    [​IMG]

    Now I want to have more space above and below the image.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade floating button design for your Divi site without using any plugins:View Demo
  6. Yes. But you are not using the Divi builder (different from the Divi Theme Builder) on the posts themselves. The only ways I know of to make the padding adjustments you want are:

    1. To edit each post individually and make sure there is proper spacing between your text and images using <br>
    2. Add custom css that adds padding to each img tag, which will affect all of your images or if done for each individual image will create a lot of unnecessary code.

    Theoretically you could fudge the spacing though, if you aren't using the border (and this will look weird with the box shadow):
    In your Divi Theme Builder (you pictured above) add a transparent upper and lower border to the image settings. You can make these as small or large as you'd like. However I am unable to get the borders to work on my devel site.
     
  7. cwly

    cwly Member

    sorry for my late response. I was busy over the weekend.

    1. I don't want to do this. When writing an article I just want to take care about the writing. Not also about the style. Therefore every article has the same style and I am totaly fine with this.
    2. CSS shouldn't apply to all images. Honestly I didn't check it by myself but is there no possibility to only cover the images within a blog post?

    I tried but somehow doesn't work. I can't set any kind of border. Even a colored one isn't visible. Seems a bit strange.

    I thought there would be a easier solution :(
     
    1. PRO MEMBER PERKS Divi.Help Layout AI Generator - Try the power of AI to generate a custom Divi layout for you:Try Now
  8. 1. I figured that was the case, but unfortunately, I think it may be the only solution that will work at the moment.
    2. Your statement is correct if you assign each of the images their own class, but in the default situation, all of the images are addressed by the <img> tag and so editing the css for the img tag will change all images. You can adjust this by referencing each image number in the css. This seems like a bad work around, since you would have to edit the css every time you add a new image.

    If you are able to add a class to each of the post images, then you can simply add:

    .classname {
    padding-top: 25px;
    padding-bottom: 25px;
    }

    This code will add padding to all images with that you assign to that classname.

    As for the borders: that's the same issue I was having with the borders. I think they need to fix that.


    If anyone else has a solution, please feel free to comment!
     
  9. cwly

    cwly Member

    I guess I figured it out.

    The images within the divi blog module are wrapped inside a <div> container which contains the image and the caption. The container is just called .wp-block-image

    So, adding this one the the Theme Customizer does the trick:

    Code:
    Log In or Sign Up to view this code.
    Right now it seems to me that this container is only used for images inside the blog module.

    Shanora Networks in the end it was easier than expected. Thank you anyway for your help.
     
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Modern & powerful Agency Divi layout pack, featuring team carousel, sliding menu, etc.View Demo
  10. Thanks for letting us know. If that is only used for posts, that's great! I hope they add that capability to the builder in the near future. It seems that it would be useful for a lot of people.