[Resolved] Mobile Sections Padding

Home Forums Support [Resolved] Mobile Sections Padding

Home Forums Support Mobile Sections Padding

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #273740
    Mark

    Hi guys,

    Just wondering am I doing something wrong.

    The mobile padding is working fine on normal pages but when I use sections it doesn’t seem to work.

    You can see examples here: http://www.towtrucks.ie

    Works here: http://www.towtrucks.ie/about

    Thanks

    #273819
    Leo
    Staff
    Customer Support

    Hi Mark,

    The mobile padding only controls padding for normal containers and not sections.

    Try this CSS below for mobile padding in sections:

    @media (max-width: 768px) {
        .generate-sections-inside-container {
            padding-left: 25px;
            padding-right: 25px;
        }
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know if this works.

    #273822
    Mark

    Hi Leo,

    Doesnt seem to work?

    Thanks,
    Mark

    #273824
    Leo
    Staff
    Customer Support

    I missed a bracket above…Can you try the code again?

    #273870
    Mark

    Happy days Leo! Worked a threat. Cheers.

    #273871
    Leo
    Staff
    Customer Support

    You’re welcome πŸ™‚

    #273903
    Tom
    Lead Developer
    Lead Developer

    Thanks for pointing this out – it should work for Sections as well. Made a note of it πŸ™‚

    #273913
    Mark

    No problem Tom, just so you know it would be handy if it worked on Sidebars as well.

    #273914
    Tom
    Lead Developer
    Lead Developer

    Mobile padding for sidebar widgets?

    #274201
    Roman

    Yes, it works.

    I’m happy with sections. Should I remove the CSS later?

    http://www.tschechisch-service.de
    bye
    Roman

    #274257
    Tom
    Lead Developer
    Lead Developer

    Once 1.2.95 is released you’ll be able to remove the CSS πŸ™‚

    #358015
    Kristijan

    hi,

    I’m using the code posted above by Leo for customizing section padding on mobile.
    I’ve changed the code to address top and bottom instead of left and right.
    It’s not working though.

    Can you please see why, here is what I’m using:

    @media (max-width: 768px) {
        .generate-sections-inside-container {
            padding-top: 25px;
            padding-bottom: 25px;
        }
    }
    #358099
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the page in question?

    Thanks!

    #358132
    Kristijan

    here you are:

    link

    #358173
    Leo
    Staff
    Customer Support

    It’s getting overwritten. Try this:

    @media (max-width: 768px) {
        .generate-sections-inside-container {
            padding-top: 25px !important;
            padding-bottom: 25px !important;
        }
    }

    That’s assuming you want this padding for every section.

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