Archived topic
Content width is not container width. Cannot set it to match the container
9 replies · Started by Liis on April 19, 2021
Hi,
My container is 900px set from
layout > container > container width > 900px
however, the content inside it refuses to be full width within this 900px container. It limits itself to 675px.
What causes this? Here is a picture
https://prnt.sc/11pkxxp
Hi there,
Can you check to see if there is a layout element created with the content width specified?
https://docs.generatepress.com/article/layout-element-overview/
https://docs.generatepress.com/article/layout-element-overview/#content-1
If this doesn't help please link us to the page in question.
Thanks!
Thanks for the lightning fast reply.
I don't have any elements on the site. My site is still under development, so can't link to the page unfortunately.
Elements:
https://prnt.sc/11pm2i6
Can you duplicate the issue on a staging site so I can inspect the code?
It's not possible to resolve an issue like this based on screenshots unfortunately.
Let me know :)
Hi Liis,
It's because you have the right sidebar activated though there's no content in it, it still occupies the space.
https://www.screencast.com/t/T7SUPwa6
Go to Customizing > Layout > Sidebars, choose content(no sidebar) for Sidebar Layout.
Let me know :)
That must have been it :)
Is the sidebar counted inside the layout > container > container width > 900px ?
Yes it is.
For example, if you set your sidebar width 30%, with 900px width container, the sidebar will be 270px in width, and content would be 630px in width.
Perfect, that explains it. Silly me!
Thank you. Matter solved.
No problem :)