How to Vertically Align Content in Divi: A Step-by-Step Guide

Understanding Vertically Align Content in Divi

Vertical alignment refers to positioning content centrally or at specific vertical positions within a container. Think about a button perfectly centered in a column or text aligned in the middle of a hero section. It’s all about balance and aesthetics.

Step-by-Step Guide to Vertically Align Content

  1. Add a “New Section” with however many columns you want to use for your layout,

I am using two in this example.

Vertical Alignment in Divi Theme

Hover over the row containing your content and click the “gear icon”.

Got to the “Row settings” and in the “Design” tab set “Equalize Column Heights” to Yes.

Then “Save & Exit”.

Equalize Column Heights

Now add your modules and content to the row, You can use pretty much anything. Here is an example. I am using the left side image, right side size text, as you can see, all the content is aligned to the top.

Vertically Align Any Content in Divi

Next, Go back into your “Column setting”, and in the “Advanced tab”, add the class “vertical-align-content” to each of the “CSS Class” “fields you want vertically centered. I have added to all two columns here but you don’t need to if you don’t want to.

Then “Save & Exit”.

divi Column setting

Learn Where to Add Custom Code in Divi

Writing Custom CSS in Divi Theme Options

Add the following code:

Go to Divi > Theme Options > Custom CSS.

/* Custom CSS for vertical align content in divi */

.vertical-align-content{
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

Now your content should be nicely aligned to the vertical center like this:

Vertically Align Content in divi

That’s all for today!
Discover more by supporting me on
Buy Me A Coffee
Webflow vs Framer: Which No-Code Web Design Tool is Right for You?

Webflow vs Framer: Which No-Code Web Design Tool is Right for You?

Hey there, web design enthusiasts! If you’ve been diving into the world of no-code tools, you’ve probably heard of Webflow and Framer. These two platforms have been making waves in the web design community, but which one is the better choice for your next project?...

Webflow vs WordPress: Which One is Right for You?

Webflow vs WordPress: Which One is Right for You?

When it comes to building a website, Webflow and WordPress are two of the biggest names in the game. Both offer powerful tools to help you create a stunning online presence, but they cater to different audiences and skill levels. So, which one should you choose? Let’s...

How to Optimize Your Webflow Site for Speed & Performance

How to Optimize Your Webflow Site for Speed & Performance

A slow website is a fast way to lose visitors. No one likes waiting for a page to load, and if your Webflow site isn’t optimized for speed, you’re likely driving away potential customers before they even see what you have to offer. The good news? Webflow is built for...