- This topic has 9 replies, 3 voices, and was last updated 1 year, 7 months ago by
David.
-
AuthorPosts
-
January 8, 2021 at 9:34 am #1611247
Dev
Hello,
Is it possible to do custom content padding?
I have created a specific post layout in the element section. For that, I want my custom content padding.
Top-20 Bottom-20 Right-20 Left-20.
Please let me know.
January 8, 2021 at 10:06 am #1611304Leo
StaffCustomer SupportHi there,
Not sure if I fully understand.
Which element are you referring to?
Can you link me to the specific page in question?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 8, 2021 at 10:14 am #1611320Dev
Hello,
I simply saying.
I had made a single post layout in appearance > Element > Layout
For that single post layout, I want custom content padding.
Top-20 Bottom-20 Right-20 Left-20.
January 8, 2021 at 10:18 am #1611331Leo
StaffCustomer SupportLayout elements does not have an option to set custom content padding unfortunately.
But if the goal is to change the content padding of single posts, we can try this CSS:
.single-post .inside-article { padding: 20px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 8, 2021 at 10:26 am #1611345Dev
hello,
Where I have to add this CSS.
If I will add this in a simple CSS plugin it will change the padding for all site posts.
I only want to change the content padding for only a few posts.
So where I need to add this code.
January 8, 2021 at 10:51 am #1611366Leo
StaffCustomer SupportCSS can be added using one of these methods:
Adding CSS: https://docs.generatepress.com/article/adding-css/– If you use Simple CSS, then it gives you a metabox in each post so that the CSS will only apply to the post with the CSS:
https://www.screencast.com/t/pPq4cs9SzThen this is the CSS you would use:
.inside-article { padding: 20px; }
– If you use Additional CSS, then you’d need to target the posts that you want to apply the CSS to like this:
body.postid-123 .inside-article, body.postid-1234 .inside-article, body.postid-12345 .inside-article { padding: 20px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 8, 2021 at 7:28 pm #1611691Dev
hello,
The below CSS is not working.
.inside-article {
padding: 20px;
}Please let me now
January 9, 2021 at 6:03 am #1612018David
StaffCustomer SupportHi there,
can you link us to a post where the Layout Element is applied ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 9, 2021 at 7:11 am #1612235Dev
Hello,
Thanks, I solved the problem.
January 9, 2021 at 8:27 am #1612318David
StaffCustomer SupportGlad to hear that
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.