- This topic has 7 replies, 2 voices, and was last updated 2 years, 11 months ago by
Fernando.
-
AuthorPosts
-
March 26, 2023 at 3:26 pm #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.March 26, 2023 at 5:28 pm #2583309Fernando 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.
March 26, 2023 at 6:27 pm #2583355ammgbr
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.
March 26, 2023 at 6:48 pm #2583364Fernando 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?
March 27, 2023 at 12:22 pm #2584677ammgbr
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.
March 27, 2023 at 5:40 pm #2584862Fernando 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; }April 2, 2023 at 7:27 am #2593044ammgbr
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.
April 2, 2023 at 6:12 pm #2593756Fernando Customer Support
Does something like this work for the Search Bar?:
.inside-navigation form.wp-block-search { margin: 10px; } -
AuthorPosts
- You must be logged in to reply to this topic.