Below are examples of how the Person module looks before and after center aligning the image:
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;
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.
This does not work on my module… It gives an error?
Says "Expected a 'FUNCTION' or 'INDENT' after colon"
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!