Site logo

[Support request] Global default site container

Home Forums Support [Support request] Global default site container

Home Forums Support Global default site container

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2583238
    ammgbr

    I want all my pages to have a preset padding and margin globally controlled so that I don’t need to introduce a new page container for each page.
    I tried using elements blocks and hooks but haven’t managed to implement this.
    I would appreciate any advice on how to best approach this.

    #2583309
    Fernando
    Customer Support

    Hello there,

    Do the paddings in Appearance > Customize > Layout > Container work for you? Reference: https://docs.generatepress.com/article/content-padding/

    If not, we can use custom CSS. Let us know if you need help with regard to this.

    #2583355
    ammgbr

    I dont get the same level of control – padding and margin for the page container of all pages. I thought it could be done via the elements.

    I can try a CSS solution.

    #2583364
    Fernando
    Customer Support

    What you can do with an Element is set a width: https://docs.generatepress.com/article/layout-element-overview/#content-1

    Otherwise, our recommendation is to add a Container Block for each page and set it there. But, if you don’t like this method, we can then try CSS as mentioned.

    The other way is the one also mentioned through Appearance > Customize > Layout > Container.

    What sort of padding and margin are you wanting for each page?

    #2584677
    ammgbr

    I’ve tried using: The other way is the one also mentioned through Appearance > Customize > Layout > Container.

    However, I get no control over margin. And even padding does not appear applied unless if there’s something missing.

    Adding a container on each page is laborious when I want to make changes.

    For more global control I guess I have to use CSS. I can try that and see how it works.

    #2584862
    Fernando
    Customer Support

    What sort of padding and margin are you wanting for each page? Can you give a bit of an idea of the spacing you’re going for?

    Would it be like this where the margin is for the entire page including the header?: https://share.getcloudapp.com/llu75k5e

    Or, are you wanting it just for the content? If so, does a CSS like this work?:

    .site-content {
        margin: 50px;
        padding: 50px !important;
    }
    #2593044
    ammgbr

    Hi I want it just for content. However I was also looking for a separate way to change the padding/margin around the search bar.

    #2593756
    Fernando
    Customer Support

    Does something like this work for the Search Bar?:

    .inside-navigation form.wp-block-search {
        margin: 10px;
    }
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.