[Resolved] Custom content padding

Home Forums Support [Resolved] Custom content padding

Home Forums Support Custom content padding

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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.

    #1611304
    Leo
    Staff
    Customer Support

    Hi there,

    Not sure if I fully understand.

    Which element are you referring to?

    Can you link me to the specific page in question?

    #1611320
    Dev

    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.

    #1611331
    Leo
    Staff
    Customer Support

    Layout 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;
    }
    #1611345
    Dev

    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.

    #1611366
    Leo
    Staff
    Customer Support

    CSS 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/pPq4cs9Sz

    Then 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;
    }
    #1611691
    Dev

    hello,

    The below CSS is not working.

    .inside-article {
    padding: 20px;
    }

    Please let me now

    #1612018
    David
    Staff
    Customer Support

    Hi there,

    can you link us to a post where the Layout Element is applied ?

    #1612235
    Dev

    Hello,

    Thanks, I solved the problem.

    #1612318
    David
    Staff
    Customer Support
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.