[Resolved] How do I set the content and sidebar widths?

Home Forums Support [Resolved] How do I set the content and sidebar widths?

Home Forums Support How do I set the content and sidebar widths?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1602064
    Toby

    I must be missing something very basic because this should be a very simple task:

    I need to set the content max-width to 600px and the right sidebar max-width to 300px. As long as the browser window is large enough these should be the settings used.

    “content” to me is the width (including padding) for the main center “column” on the site.

    The Customizing -> Layout -> Container stuff seems to just change things relative to the “container width” which is not good enough. I need to be *sure* the content column is 600px wide, and that the right sidebar is 300px (again, when there is room available).

    How do I set the max widths to fixed values for these elements while retaining the responsive layout etc?

    Regards,
    Toby

    #1602115
    Leo
    Staff
    Customer Support

    Hi Toby,

    Try setting the content container width to 900px and use this CSS to set the sidebar width to a fixed width of 300px:
    https://docs.generatepress.com/article/sidebar-widths/#fixed-width

    Let me know if this helps πŸ™‚

    #1603076
    Toby

    Yes, this solved my problem (I also did some changes to account for padding etc).
    Thank you for the quick reply, I didn’t expect that over the holidays :-).

    cheers, Toby

    #1603101
    Leo
    Staff
    Customer Support
    #1604031
    Mark

    This looks like it will help me also. I am trying now on my staging site.

    Just wanted to add for Leo/GeneratePress: The 300px sidebar is a request/need for sites running ad networks. the 300px sidebar ad is very popular and lucrative. The preferred behavior is, as a user shrinks the webpage smaller, the sidebar holds the 300px width (still showing ads) and at some point it hits the min content column size, and the sidebar just disapears.

    Just mentioning in that it may be a more common request than expected, and maybe it could be baked into the settings for the future

    #1604107
    Leo
    Staff
    Customer Support

    Thanks for your suggestion. Options like this likely won’t be baked into GP Premium as it really isn’t requested that often – which is why we have the snippet ready in our docs πŸ™‚

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