Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

How To Change Spacing Between Post And Side Bar

  • Hi there,

    I am trying to increase the white space between my posts and the right sidebar and cannot work out how to do it!
    I am using a single container and have my right sidebar fixed to 300px.

    Can you let me know what setting i can use to increase this spacing? I can’t use the separating space in the container layout settings, as that also then changes the spacing on the blog and category pages.

    Do I need to use a layout or block element – will that work or just shrink the entire size of the page including the sidebar?

    Also, can you let me know how I can prevent the sidebar showing at the bottom of posts for mobile?

    Thanks,
    Rachel

  • Hi there,

    I am trying to increase the white space between my posts and the right sidebar and cannot work out how to do it!

    This CSS should work:

    .one-container.right-sidebar .site-main {
        margin-right: 50px;
    }

    Also, can you let me know how I can prevent the sidebar showing at the bottom of posts for mobile?

    Not sure if I fully understand. Do you mean to hide the sidebar on mobile in single posts only?
    If so this CSS should work:

    @media (max-width: 768px) {
        .single .sidebar {
            display: none;
        }
    }

    Learn how to add CSS: https://docs.generatepress.com/article/adding-css/

    Let me know 🙂

  • Perfect – thanks Leo – this worked.

    On a side note, is custom Css the most efficient way to design the blog post layout, as I have now got quite a collection of custom CSS entries targeting specific designs for my blog posts.

    Is it more efficient to set up a custom post layout using elements and blocks?

    Cheers,
    Rachel

  • That’s a tough question to answer as it depends on what you are trying to achieve.

    For this specific case, CSS is the most efficient method.

  • Thanks Leo.

  • No problem 🙂

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