Center Align the Image in the Divi Person Module

Written by Dan Mossop

When the Divi Person module is displayed in a narrow width (e.g. in a two-column row), the person image will appear above the title and description and is left-aligned by default. Unfortunately, there isn't an option to center align this image directly within the module settings. However, you can achieve the desired alignment by adding a bit of custom CSS.

Below are examples of how the Person module looks before and after center aligning the image:

Before
After

Center align the Divi person module image using CSS

Here are the steps to center align the image in the Divi Person module using custom CSS:

1) Navigate to the page where you have the Person module.

2) Enable the Divi Builder and open the settings for the Person module you want to edit.

3) Within the Person module settings, click on the "Advanced" tab.

4) Scroll down to the "Custom CSS" section.

5) Click on the "Module Elements" button:

6) In the "Member Image" field, paste the following CSS:

margin-left: auto;
margin-right: auto;
This will center the image within the Person module.

Here is an example screenshot of where to add the CSS in the Person module's settings:

7) Save your changes and exit the settings.

By following these steps, you can easily center align the image in the Divi Person module, helping to make your images look more balanced and professional.

Streamline Your Divi Workflow!

Copying images and content directly from your clipboard into Divi has never been easier. Say goodbye to the cumbersome save-and-upload routine and hello to streamlined efficiency. Perfect for developers who frequently customize Divi modules with additional CSS.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

2 Comments

  1. This does not work on my module… It gives an error?

    Says "Expected a 'FUNCTION' or 'INDENT' after colon"

    Reply
    • Hi Teresa, this error suggests that the code is being entered in the wrong box. Divi has added a "Free-Form CSS" box in the "Custom CSS" section, which now shows as the default instead of the existing CSS boxes such as "Member Image". To get to the "Member Image" box, you now need to click the "Module Elements" button in the "Custom CSS" section. I've amended the instructions in the post above to include this. I think if you follow the revised instructions you should be able to locate the correct box and no longer receive the error. I hope that helps!

      Reply

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

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

We may earn a commission when you visit links on our website.

Latest Posts

Set Custom CSS IDs for Individual Divi Accordion Items

Assigning unique CSS IDs to specific Divi Accordion items allows for precise control over styling, targeting, and linking within your page content. This ability is particularly useful when you want to apply custom designs or create anchor links to particular accordion...

Enable Swipe Navigation in the Divi Gallery Lightbox

Enabling swipe navigation in the Divi Gallery module's lightbox allows users to seamlessly browse through gallery images by swiping left or right, creating a more interactive and mobile-friendly experience. This functionality can significantly improve user engagement...

Disable Slide-In Animation for Divi Gallery Grid Images

Control how images appear in your Divi Gallery module by toggling the slide-in animation effect for grid layouts. Disabling the slide-in animation allows gallery images to load instantly and appear statically, providing a faster and distraction-free browsing...

Control Image Count Display in Divi Gallery Lightbox

Displaying or hiding the image count in the Divi Gallery module’s lightbox can help customize the user experience, depending on whether you want to give visitors an indication of gallery progress or prefer a cleaner, distraction-free view. The ability to toggle this...

Hide Gallery Image Titles in the Divi Lightbox Overlay

Displaying image titles in the lightbox overlay of the Divi Gallery module can sometimes be distracting or unnecessary, depending on your website’s design and user experience goals. Hiding these titles creates a cleaner and more focused viewing experience for visitors...

Random Posts