- This topic has 5 replies, 3 voices, and was last updated 5 months ago by
Elvis.
-
AuthorPosts
-
March 4, 2022 at 12:17 pm #2142675
Michelle
I’m loving GeneratePress in general but am really struggling with how to set defaults for pages / containers / inner containers.
On this page: https://utw11145.utweb.utexas.edu/programs/veteran-spouse-resiliency-group-test/
I have the page ‘Content Container’ set to ‘Full Width’ on this page, and it works great – BUT, on narrower screen widths, the inner containers have no padding so the text pushes right up to the edges of the screen.
If I set the page ‘Content Container’ to ‘Default’, nothing goes Full width, even the containers that are set to Full Width and have background colors etc.
I don’t want to have to edit every single container on every page to adjust inner padding for various screen sizes. I can set it in my child theme’s custom CSS but it seems like it should just work? What am I doing wrong?
March 4, 2022 at 12:21 pm #2142677Leo
StaffCustomer SupportHi Michelle,
The most “correct” way would be to add the padding to GB’s containers.
If you add some values for the desktop view, it should inherit for tablet and mobile.
Let me know if this helps ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 4, 2022 at 1:12 pm #2142735Michelle
But that would mean I have to add padding to every single container that I use site-wide, and if I decide to change the global padding I’d have to re-edit every single container…. what a colossal pain. I can’t believe that’s how all the sites running on GeneratePress do it.
March 6, 2022 at 9:34 am #2144510Elvis
Michelle, no you do not neet to do it on every page.
There is several ways you can deal with this.
One is customizer > layout > container alighnment = boxes
Other is Elements … set you default container there
Or in the GB defaults like this (functions.php) https://github.com/thisbit/apuri/blob/master/themes/generatepress_child/inc/thisbit%40apuri_generateblocks.phpnot knowing the specifics … one of these methods will work.
To understand recursion, you first have to understand recursion.
March 15, 2022 at 1:42 pm #2155891Michelle
Thanks Elvis! I’d love to look at that php in the functions.php file but that link to Github isn’t working for me – can you resend? thanks!
March 16, 2022 at 1:56 am #2156327Elvis
Michelle, sorry I forgot that this one is a private github repo. ๐
here is the list of all the options on toms github: https://github.com/tomusborne/generateblocks/blob/c2aad72f6868001c6f7fa9b606cafef511eebd1b/includes/defaults.php#L231-L243and here are instuctions on how to do it
https://wordpress.org/support/topic/default-margins-for-containers/#post-13025697To understand recursion, you first have to understand recursion.
-
AuthorPosts
- You must be logged in to reply to this topic.