Site logo

Archived topic

Mobile Sections Padding

16 replies · Started by Mark on February 3, 2017

Viewing posts 1–15 of 17

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

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.

Hi Leo,

Doesnt seem to work?

Thanks,
Mark

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

Happy days Leo! Worked a threat. Cheers.

You're welcome :)

Thanks for pointing this out - it should work for Sections as well. Made a note of it :)

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

Mobile padding for sidebar widgets?

Once 1.2.95 is released you'll be able to remove the CSS :)

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;
    }
}

Hi there,

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

Thanks!

here you are:

link

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.

This archived topic is closed to new replies.