How to Change Order of Columns on Mobile in Divi

February 25, 2023

In this little tutorial, I’m going to show you how to change the order of columns on your mobile device in Divi. Unfortunately, Divi doesn’t support the flexbox layout by default so we’ll need to use custom CSS.

1. Give your row a custom class

In my case, I will go with rp_row class but you can choose your own.

Give custom class to your row

Give custom class to your row

2. Add custom CSS to your Divi Theme Options

Go to DiviTheme OptionsCustom CSS (or your stylesheet) and add the following code:

@media only screen and (max-width: 479px) {
   #page-container .rp_row {
     display: flex; 
     flex-wrap: wrap;
   }
   #page-container .rp_row .et_pb_column:first-child {
     order: 2;
   }
   #page-container .rp_row .et_pb_column:nth-child(2) {
    order: 1;
   }
}

 

The code above changes the column order on mobile. You could also change the breakpoint to have the code applied to tablet as well. Just modify the code to the following:

@media only screen and (max-width: 980px) { 
   #page-container .rp_row {
     display: flex; 
     flex-wrap: wrap;
   } 

   #page-container .rp_row .et_pb_column:first-child {
     order: 2;
   }

   #page-container .rp_row .et_pb_column:nth-child(2) {
     order: 1;
   }
}

More about Divi Breakpoints

You can also learn more about Divi breakpoints in my article.

5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Zion Builder

More from my blog

Website mockup of a construction company
Website mockup of a wedding planner company

I Develop Pixel-Perfect WordPress Websites

I’m an expert in creating top-performing, fully optimized WordPress websites that are customized to suit your specific needs. Whether you need an online store, a membership site, an LMS platform, or any other type of website, I have the knowledge and expertise to deliver results that exceed your expectations.

Testimonial From My Clients

    Would you like to chat?