Site logo

Archived topic

How do I set the content and sidebar widths?

5 replies · Started by Toby on January 1, 2021

Viewing posts 1–6 of 6

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

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

No problem :)

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

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 :)

This archived topic is closed to new replies.