Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1112317

    Hello,

    I’m trying to create a section of three icons side by side that will be visible on all screen sizes, however, I cannot find a way to prevent Enfold from automatically converting my columns into a full width element on mobile. How can this be accomplished for just this section? Thanks!

    #1112475

    Hey LOFOB,

    It does break on my end, the icons are on their own line on mobile resolutions. Is that not what you are looking for?

    Best regards,
    Rikard

    #1112621

    No it’s not, I’m looking to prevent the breakpoint and maintain the three columns on the mobile screen size!

    #1112665

    Hi,
    Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    @media only screen and (max-width: 767px) { 
    .post-entry-734 div .av_one_fifth {
        margin-left: 6% !important; 
        width: 15.2% !important; 
    }
    .post-entry-734 div .av_one_fifth.avia-builder-el-36 {
        margin-left: 0% !important; 
        width: 15.2% !important; 
    }
    }

    Then clear your browser cache and any cache plugin, and check.

    Best regards,
    Mike

    #1112700

    That did it, thanks for the help! If I want to apply this to a different section as well, do I just change the post entry # in the CSS?

    #1112712

    Hi,
    Glad this helped, yes you can change the post entry # to apply to a new section, or if you add a custom class to the element and use this class instead of the post entry # you can apply it to anywhere on your site.
    Please let us know if you want a hand in setting this up.

    Best regards,
    Mike

    #1112847

    Perfect thank you, this is an element repeated on many pages, that helps a lot!

    #1112872

    Hi,

    Great, I’m glad that you managed to get it working. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1112930

    Actually I do. Is there a way to create a class, and not and ID for the sections I am trying to target? As I mentioned above they are repeated throughout the site and it’s not good web design practice to make a bunch of repeating IDs!

    #1112931

    I should more specifically say: how can I repeat this effect across many sections w/ a code example? Thanks!

    #1113084

    Hi,
    Typically, I write solutions to be specific so to not conflict with other pages and elements.
    But if you would like to try this across your whole site, please try this css:

    @media only screen and (max-width: 767px) { 
    div .av_one_fifth {
        margin-left: 6% !important; 
        width: 15.2% !important; 
    }
    div .av_one_fifth {
        margin-left: 0% !important; 
        width: 15.2% !important; 
    }
    }

    If this doesn’t work please post a link to the new page so we can examine.

    Best regards,
    Mike

    #1113203

    I’ll just have to go through a tweak the original code a bunch of times for all those sections… I don’t want to break the rest of the columns. An ID doesn’t work as the “avia-builder-el-36” element needs to be changed for each new section also.

    Really wish that you could preserve columns on mobile for instances like this!

    #1113479

    Hi,

    Thank you for the update.

    The custom class field should enable you to target specific elements so that you don’t have to use their default css selectors (e.g. “avia-builder-el-36″, “av_one_fifth” etc).

    // https://kriesi.at/documentation/enfold/intro-to-layout-builder/#turn-on-custom-css-class-field-for-all-alb-elements

    Best regards,
    Ismael

    #1113573

    Sounds good, all set on my end now!

    #1113795

    Hi,

    Great, thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.