How to Reverse Column Order in Divi for Mobile Devices

Oct 14, 2024 | Divi, WordPress

Estimated Reading Time:

When designing with Divi by Elegant Themes, you might find yourself using alternating row layouts—an image on the left and text on the right in one row, then the opposite in the next. This creates a visually appealing layout on desktop, but when viewed on mobile devices, the experience can be a bit jarring. Typically, the images and text are stacked in their original order, leading to situations where you might have two images or text blocks stacked together, breaking the flow.

For example, let’s say you have a section of your site where Row 1 features an image on the left and text on the right, and Row 2 reverses this with text on the left and an image on the right. On mobile, these elements will be displayed vertically. But instead of alternating image and text, you may end up with both images stacked together, followed by both text sections.

Luckily, with Divi, there’s a simple fix to make the design flow more naturally on mobile devices. You can reverse the column order on mobile devices using a bit of custom CSS.

Why Does Reversing Column Order Matter?

When content is stacked in a repetitive manner, it can interrupt the visual hierarchy and the message you’re trying to communicate. Reversing the column order allows the user to view the content as it was intended: with the image leading into the text in a natural flow (image, text, image, text), rather than in chunks that could be confusing.

This creates a cleaner, more user-friendly design on mobile.

How to Reverse Column Order in Divi on Mobile

Here’s a simple step-by-step guide to achieve this.

Step 1: Add a Class to Your Row

In Divi, you can target specific rows where you want to reverse the column order. To do this, we’ll add a custom class to the row.

  1. Open the Row Settings for the row you want to modify.
  2. Navigate to the Advanced tab.
  3. In the CSS Class field, add the class reverse. This will allow us to target this row with custom CSS.
image

Step 2: Add Custom CSS

Next, we need to add the actual CSS that will reverse the order on mobile devices. Here’s how to do it:

  1. Go to Divi Theme Options.
  2. Scroll down to Custom CSS.
  3. Add the following code:
/* Reverse rows on mobile */
@media screen and ( max-width: 980px ) {
    .reverse {
        display: flex;
        flex-direction: column-reverse;
    }
}

This code will tell browsers to reverse the column order for any row with the class reverse on screen sizes below 980px (the typical width of most tablets and mobile devices).

divi reverse css

What Does This CSS Do?

  • The @media rule ensures that the style is only applied on devices with a screen width of 980px or less (essentially tablets and phones).
  • display: flex; enables a flexible box layout for the row, which allows for better control of how elements are ordered.
  • flex-direction: column-reverse; reverses the order of the columns, so on mobile, the image will appear under the text, or vice versa, depending on your layout.

Why Use This Approach?

While Divi offers powerful visual editing options, sometimes a little custom CSS can go a long way in giving you the flexibility to achieve exactly what you want. By using this method, you can:

  • Ensure that your website looks polished and professional on all devices.
  • Prevent odd layout issues, such as two images stacking on top of each other.
  • Improve user experience by maintaining a logical flow of content on mobile.

Final Thoughts

Understanding how to customize your website to improve user experience is key to providing a polished and functional design. By reversing the column order on mobile, you can ensure your site not only looks great but also delivers your content in a more engaging and accessible way.

Stay tuned for more Divi tips and tricks, and if you ever need help managing or optimising your WordPress website, our WordPress Care Plans are designed to keep your site running smoothly and securely. Drop us a message to see how we can help you today!

Divi Theme Builder
Oct 16 2024

How to Create a Divi Blog Post Template Using the Divi Theme Builder

The Divi Theme Builder is one of the most powerful tools available for WordPress users looking to create custom templates for their websites. One particularly useful...
Microsoft Bookings
Oct 07 2024

Unlock the Power of Microsoft Bookings for Your Business

In today’s fast-paced world, businesses are always looking for tools that make life easier. For Microsoft 365 users, one such tool often flies under the radar:...
Sep 29 2024

Why Your Business Should Switch to Microsoft 365?

If your company is serious about growth, professionalism, and security, it’s time to consider switching to Microsoft 365. Here’s why.

Sep 13 2024

Why Managed Cyber Security is Essential for Small Businesses

In today’s interconnected world, cyber security has become more than just a buzzword. It’s a fundamental business necessity. Cyber attacks can happen to anyone, but...
Dec 29 2023

Understanding DMARC, SPF, and DKIM: Enhancing Email Security for Your Business

In today's digital era, emails have emerged as a fundamental aspect of our everyday communication. Whether for personal exchanges or professional engagements, emails...
WordPress Security Audits
Jun 27 2023

10 Essential SEO Tips for your WordPress Website

In today's digital landscape, having a well-optimised website is crucial for attracting organic traffic and boosting your online visibility. Search Engine Optimisation...
Jun 13 2023

The Importance of Regular WordPress Security Audits for Your Website

In today's digital landscape, website security is of paramount importance. Cyber threats are evolving rapidly, making it essential for businesses to prioritise the...
May 30 2023

Why Website Backups in 2023 are Critical

In 2023, websites have become an essential component of modern businesses. They serve as the face of the company, the hub of information, and the gateway to online...
Apr 27 2023

The Top 6 Benefits of a WordPress Care Plan

As more and more businesses move online, having a website has become essential. WordPress is one of the most popular website builders out there, and for good reason....
Dec 05 2022

Dedicated Email Hosting, Microsoft 365 or Google Workspace?

Email is a crucial part of business communication. It’s fast, efficient, and can be accessed from anywhere. However, relying on a free email service like Gmail or...

Go to Web Hosting

Simple web hosting solutions, free managed migration service and honest advice. We don’t make it harder than it needs to be. Let’s supercharge your website!

Go to WordPress Care

Isn’t it about time you take the stress out of managing your WordPress website? Leave your WordPress updates, security and maintenance to us for peace of mind.