[Resolved] Setting top & bottim padding for page layout

Home Forums Support [Resolved] Setting top & bottim padding for page layout

Home Forums Support Setting top & bottim padding for page layout

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2046164
    Trạng

    Hi there, I want to set the top & bottom padding for the main content area for pages on my site.

    How could I do that? The top & bottom content is very close to header & footer right now. I can’t find where to fix it 🙂

    #2046416
    Trạng

    Can anyone help me with this problem?

    #2046616
    Trạng

    Still wait for the support

    #2046625
    David
    Staff
    Customer Support

    Hi there,

    make sure your Content Container is set to Default:

    https://docs.generatepress.com/article/content-container/

    And if you can please afford us a little patience, especially on a Sunday, we aim to answer all support topics within 24hrs, spamming your own topics is not going to help us in any way to respond any faster. Thanks in advance.

    #2046919
    Trạng

    Hi thanks for the rep.

    It’s in default setting already but there is no padding in top & bottom.

    #2046959
    Elvin
    Staff
    Customer Support

    Hi there,

    I see you’re using a Layout element to set the content container to Full width (no padding).

    This particular setting removes the padding added by the customizer.

    If you wish to keep both the padding and the layout element setting, you’ll have to manually re-add the padding with CSS.

    Example:

    #content {
        padding: 40px;
    }
    #2046993
    Trạng

    Hi Elvin, but if I only use

    #content {
        padding: 40px;
    }

    This padding will be removed

     .right-sidebar .inside-page-header {
            padding: 30px 20px 120px 150px;

    I only want page layout & posts in no-sidebar layout have top & bottom padding.

    #2047015
    Elvin
    Staff
    Customer Support

    You can modify it to this:

    body.no-sidebar #page {
        padding: 30px 20px 120px 150px;
    }

    Or set it to padding: 30px 0px;. Adjust it to your preference.

    #2047020
    Trạng

    The

    padding: 30px 0px; works like a champ.

    Thanks alot!

    #2047024
    Elvin
    Staff
    Customer Support

    No problem. 😀

    #2048400
    Trạng

    Hi Elvin, is there anyway that allow me exclude the 30px top padding for the homepage? -> Screenshot

    I just realize that after use the padding 30px 0px, all the posts pages with no sidebar works like a champ but it also apply top 30px padding for homepage 😀

    #2048600
    David
    Staff
    Customer Support

    This line:

    body.no-sidebar #page {

    becomes:

    body.no-sidebar:not(.home) #page {

    #2048751
    Trạng

    It works so well! Thank David Sir!

    #2048938
    David
    Staff
    Customer Support

    Glad we could be of help

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