Site logo

[Support request] Different padding for specific blog category

Home Forums Support [Support request] Different padding for specific blog category

Home Forums Support Different padding for specific blog category

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2483116
    jisu

    Hi,

    I have set up padding (left, right) for a single post, and this setting affects posts in different blog categories.
    Is it possible to have different padding set up for specific blog categories?

    Thanks,

    #2483198
    David
    Staff
    Customer Support

    Hi there,

    it is possible with some CSS. First a question – are you adding padding to change the width of the post ?

    #2483267
    jisu

    actually, I want to erase padding for my new blog category. Then I want to add padding in a container.

    #2483275
    David
    Staff
    Customer Support

    You can use a Layout Element:

    https://docs.generatepress.com/article/layout-element-overview/

    On the Content tab, you can set the Container Area to Full Width or Contained to remove the themes padding.
    Then just set the Display Rules for the locations you want it applied eg. Post Category -> Your Category Term

    #2483316
    jisu

    Hi,

    I have already set up in layout in element. I think the padding is in the code.


    @media
    (max-width: 768px)
    .single-post #content {
    padding: 30px 20px;
    }

    #2483389
    jisu

    I think the padding is in the code. Is there a way to exclude specific blog category?

    #2483602
    David
    Staff
    Customer Support

    Can i see a post i the category you want to remove the padding from ?

    #2483645
    jisu

    Here is the link to the post

    https://swim.im/mobileapp/2382/

    #2483684
    David
    Staff
    Customer Support

    So this CSS:

    @media (max-width: 768px) {
            .single-post #content {
                padding: 30px 20px;
            }
        }

    is in the Customizer > Additional CSS. You can just delete that.

    #2483751
    jisu

    This is code for my main blog content.

    If I erase this code, my main blog content no longer have padding.

    i just want my new category dont affect that code.

    is there a way to set up padding for main blog content? without using that code?

    #2483766
    David
    Staff
    Customer Support

    The blog, and any page post or archive that has not had a Full Width/Contained Layout element applied to it will get its padding from the Customizer > Layout > Container -> Padding, theres an option for Desktop and Mobile

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