Unverified

Name

Fix Display Order on Mobile

About

[Needs CSS Class] Allow you to set the display order of modules on mobile.

Language

CSS

Rating

Voted: 0 by 0 user(s)

How to Setup Snippet

The use case here is a page with multiple 2 module rows where, in each row, there is a text module and an image module. This snippet allows you to set the order of display for the text and image module within each row. To use - Row Settings:Add CSS Class 'custom_row' to each row - Row Settings/Column Structure Add CSS class 'first-on-mobile' to the module you want to display first (eg the image module) Add CSS class 'second-on-mobile' to the module you want to display second(eg the text module)

Codevault

Captivate-Code

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.4

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

Website/ Profile URL:

https://captivatewebsites.com.au/

History

Last modified:

20/12/2023

Important Note

This snippet has the following status:

Unverified

This snippet has not been verified, use with caution and at your own risk. See details provided by author in sidebar and click below to find out more.

Fix Display Order on Mobile

 
                    
1/*Fix display order on mobile*/
2@media all and (max-width: 980px) {
3/*** wrap row in a flex box ***/
4.custom_row {
5 display: -webkit-box;
6 display: -moz-box;
7 display: -ms-flexbox;
8 display: -webkit-flex;
9 display: flex;
10-webkit-flex-wrap: wrap; /* Safari 6.1+ */
11flex-wrap: wrap;
12}
13 
14/*** custom classes that will designate the order of columns in the flex box row ***/
15.first-on-mobile {
16-webkit-order: 1;
17order: 1;
18}
19 
20.second-on-mobile {
21-webkit-order: 2;
22order: 2;
23}
24 
25.third-on-mobile {
26-webkit-order: 3;
27order: 3;
28}
29 
30 
31 
32/*** add margin to last column ***/
33.custom_row:last-child .et_pb_column:last-child {
34margin-bottom: 30px;
35}
36 
37}

0

Related Snippets

Please see some snippets below related to this snippet..

Styling

Public

0

3-D Text with Glow

Added: 2 years ago

Last Updated: 1 year ago

CSS to give a 3-D effect to text/headers (all CSS is included, because we hand-wrote it in Codepen. Omit font styling as appropriate. ..

Styling

AI Verified

0

Hex Transparency Converter

Added: 9 months ago

Last Updated: 9 months ago

When adjusting the transparency of a colour the amount of transparency is shown as a Hexadecimal value, not a percentage. So it is difficult to set the transparency to say 75% other than a guess. This...

Styling

Unverified

0

img position

Added: 2 years ago

Last Updated: 2 years ago

adds object-position dynamically

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Divi Builder

Unverified

1

Desktop Menu : Make Hamburger Menu on Desktop

Added: 7 months ago

Last Updated: 1 month ago

This CSS makes the Desktop Menu appear as Hamburger

Divi Builder

Unverified

1

Desktop Menu : Make Hamburger Menu on Desktop - Remove Bullets

Added: 7 months ago

Last Updated: 1 month ago

This snippet should be used with Make Hamburger Menu on Desktop.

General

Unverified

0

Jumping Header

Added: 6 months ago

Last Updated: 6 months ago

Use this code to prevent the jumping header. See this guide https://quadlayers.com/fix-jumping-header-in-divi/#:~:text=When%20you%20apply%20changes%20to,creates%20the%20jumping%20header%20illusion....