- This topic has 16 replies, 5 voices, and was last updated 8 years, 8 months ago by
Leo.
-
AuthorPosts
-
February 3, 2017 at 3:03 am #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
February 3, 2017 at 8:08 am #273819Leo
StaffCustomer SupportHi 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.
February 3, 2017 at 8:16 am #273822Mark
Hi Leo,
Doesnt seem to work?
Thanks,
MarkFebruary 3, 2017 at 8:24 am #273824Leo
StaffCustomer SupportI missed a bracket above…Can you try the code again?
February 3, 2017 at 9:24 am #273870Mark
Happy days Leo! Worked a threat. Cheers.
February 3, 2017 at 9:25 am #273871Leo
StaffCustomer SupportYou’re welcome 🙂
February 3, 2017 at 11:23 am #273903Tom
Lead DeveloperLead DeveloperThanks for pointing this out – it should work for Sections as well. Made a note of it 🙂
February 3, 2017 at 11:41 am #273913Mark
No problem Tom, just so you know it would be handy if it worked on Sidebars as well.
February 3, 2017 at 11:43 am #273914Tom
Lead DeveloperLead DeveloperMobile padding for sidebar widgets?
February 4, 2017 at 10:35 am #274201Roman
Yes, it works.
I’m happy with sections. Should I remove the CSS later?
http://www.tschechisch-service.de
bye
RomanFebruary 4, 2017 at 12:27 pm #274257Tom
Lead DeveloperLead DeveloperOnce 1.2.95 is released you’ll be able to remove the CSS 🙂
August 1, 2017 at 5:04 am #358015Kristijan
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; } }August 1, 2017 at 8:36 am #358099Leo
StaffCustomer SupportHi there,
Any chance you can link us to the page in question?
Thanks!
August 1, 2017 at 9:35 am #358132Kristijan
here you are:
August 1, 2017 at 10:49 am #358173Leo
StaffCustomer SupportIt’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.
-
AuthorPosts
- You must be logged in to reply to this topic.