Skip to content

Instantly share code, notes, and snippets.

@bronwynv
Created April 18, 2024 12:16
Show Gist options
  • Save bronwynv/6e6d2d52392271cdb76f37abf27c78d9 to your computer and use it in GitHub Desktop.
Save bronwynv/6e6d2d52392271cdb76f37abf27c78d9 to your computer and use it in GitHub Desktop.
OptinMonster - keep 2 columns in responsive campaign on mobile devices
@media screen and (max-width: 768px) {
html div#om-{{id}} .{{ns}}-row-content.Row__content div {
flex-direction: row !important;
}
html div#om-{{id}} .{{ns}}-column.{{ns}}-col-1.Column.om-column.optin-left-column-class,
html div#om-{{id}} .{{ns}}-column.{{ns}}-col-2.Column.om-column.optin-right-column-class {
display: inline-block !important;
}
}
/* Add a class to column 1 of omcol1. Add a class to column 2 of omcol2 */
@media screen and (min-width: 1px) and (max-width: 768px){
html div#om-{{id}} .Row .Row__content .Column.omcol1,
html div#om-{{id}} .om-row .Row__content .om-column.omcol1 {
width: 30% !important; /* adjust percentage */
}
html div#om-{{id}} .Row .Row__content .Column.omcol2,
html div#om-{{id}} .om-row .Row__content .om-column.omcol2 {
width: 70% !important; /* adjust percentage */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment