[Support request] How to set default inner container padding?

Home Forums Support [Support request] How to set default inner container padding?

Home Forums Support How to set default inner container padding?

  • This topic has 5 replies, 3 voices, and was last updated 5 months ago by Elvis.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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?

    #2142677
    Leo
    Staff
    Customer Support

    Hi 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 ๐Ÿ™‚

    #2142735
    Michelle

    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.

    #2144510
    Elvis

    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.php

    not knowing the specifics … one of these methods will work.

    To understand recursion, you first have to understand recursion.

    #2155891
    Michelle

    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!

    #2156327
    Elvis

    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-L243

    and here are instuctions on how to do it
    https://wordpress.org/support/topic/default-margins-for-containers/#post-13025697

    To understand recursion, you first have to understand recursion.

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