How to Add Padding Around Featured Images in Divi’s Blog Module

by | Last updated May 9, 2026 | Divi Tutorials

If you’re using the Divi theme for your WordPress website and want to customize the appearance of your blog posts page, one simple tweak you can make is adding padding around the featured images.

This can help create a more visually appealing layout and better separate the featured image from the surrounding content.

Pro Tip: How to Build a Website With Divi Theme – Beginner’s Guide

In this tutorial, you’ll learn how to add padding around featured images in Divi’s blog module using a simple custom CSS code.

Before:

add padding around featured images in Divi's blog module

How to Add Padding Around Featured Images in Divi’s Blog Module with Custom CSS

  • In the blog module settings, switch to the “Advanced” tab.
  • Scroll down to the “Main Element” section under the Custom CSS section.

add css in the main element

In the Main Element box, add the following code:

.et_pb_blog_grid .et_pb_image_container img {
  padding: 20px; /* Adjust the value as needed */
}
  • This code targets the featured image within the blog grid and adds padding around it. You can adjust the padding value to your desired amount.
  • Click “Save Changes” to apply the custom CSS.

Now, you will be having something like this:

add padding around featured images in Divi's blog module-after

You’ll now have added padding around the featured images in your Divi blog module, giving your blog posts a more polished and visually appealing look.

I hope that you enjoyed this post. Subscribe to Divi Banks on YouTube and join our newsletter for more crisp content on WordPress and web design.

Shop Divi Products

Buy nicely done Divi Layouts, Child themes, and extensions for your next Divi project.

Related Articles

Divi Logo Guide: Everything You Need to Know

Divi Logo Guide: Everything You Need to Know

A professionally designed logo is a powerful branding asset that can leave a lasting impression on your website visitors. Research shows that a well-designed logo can boost consumer trust in a brand by an impressive 75%. But the question most people ask is – how do...

How to Add SVG Files in Divi – Beginner’s Guide

How to Add SVG Files in Divi – Beginner’s Guide

By default, WordPress doesn't allow for SVG file uploads. This becomes a problem when you want to add  SVG files in Divi. If you are reading this post, chances are that you tried adding an SVG image file to your Divi website and ran into an error like this: What is an...

Leave a Comment

2 Comments

  1. Mercy M.

    Very useful guide. Thanks for sharing.

    Reply
    • Patrick

      Thank you, Mercy.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

WP101 - FREE WordPress Tutorials

Enter your email address below to gain access to the FREE WordPress training.

You have Successfully Subscribed!

Pin It on Pinterest