How to vertically align text & images in Divi

Vertically align text and images in Divi using custom CSS

Text and image content looks stylish when vertically aligned. The problem is that Divi does not make vertical alignment very easy – so we must use some custom CSS.

Follow us in this Divi tutorial as we show you how to vertically align your Divi content.

Method 1: Vertically align content in a row using Flex and auto-margin

  1. In your row settings Design tab, click on the Sizing tab and set the Equalize Column Heights to yes..
  2. Add margin:auto; to the Advanced Tab of the row column that you would like to vertically align.

Method 2: Vertically align content in a row using CSS Flex direction

  1. In your row settings Design tab, click on the Sizing tab and set the Equalize Column Heights to yes..
  2. Add display: flex; flex-direction: column; justify-content: center; to the Advanced Tab of the row column that you would like to vertically align.

Method 3: Vertically align content in the center of a column using CSS Flexbox

  1. In your row settings Design tab, click on the Sizing tab and set the Equalize Column Heights to yes..
  2. Add align-self: center; to the Advanced Tab of the row column that you would like to vertically align.
Vertically Center Content in Divi
written by

David Wilkinson

Customer Support & Research Analyst

You have probably seen his name around but today we want to introduce David to you. We love your brain and the way it works, constantly ticking and analyzing how we can make processes better.

Check these out
2 Things you should change on every Divi site you build
How to Add a Secondary Menu to your Global Header in Divi using the Theme Builder
How to vertically align text & images in Divi
How to Add Dynamic Content to your Global Footer in Divi using the Theme Builder
How to Build a Custom Global Footer in Divi using the Theme Builder
How to Build a Custom Global Header in Divi using the Theme Builder
Make Divi Buttons not look like Divi Buttons with Global Styles and Divi Global Presets
How to un-Divify your Divi Sites Tutorial Series

1 Comment

  1. I like that this offers several methods, when most only offer method 1 as it’s by far the easiest and most common application.

    It might be worth mentioning that method 2 also works for individual lements in a layout used in an archive loop in Divi Machine. I wanted to vertically center titles, regardless of whether they wrapped onto more than 1 line. This is complicated using the single layout of course, but method 2 did the trick.

    I had to apply it in the Divi CSS rather than in the element itself, as the Post Title block defaults to H1, and I wanted it as H2, but it works beautifully with a custom class.

Submit a Comment

Explore more from Divi Engine