- This topic has 9 replies, 3 voices, and was last updated 5 months, 4 weeks ago by
Leo.
-
AuthorPosts
-
July 19, 2020 at 7:34 am #1368615
Matt
Hi GP Team! I’m looking to set a default width on pages that I set as “Content (no sidebars”) (aka full width).
At first, I thought I had it working via:
@media (min-width: 1200px) {.page-template-default .site.grid-container {max-width: 860px;}}And it did work: https://gyazo.com/8323a374cc5e01bf7c9372cebb5df40a (or at least I thought).
However, I edited a different page (set to Default) fixing a typo, hit “update”, and then the page got screwed up: https://gyazo.com/169848bab73b1c8ba72c4da7eb008488
I’m pretty sure the .page-template-default is the incorrect selector lol π
Is there a specific selector I can use for pages that are full width, aka Content (no sidebars) instead? Or is there a different snipper of CSS I should be using?
Thanks so much!
July 19, 2020 at 8:26 am #1368782Leo
StaffCustomer SupportHi there,
I think creating a single layout element to select the sidebar layout and content layout would be the easiest:
https://docs.generatepress.com/article/layout-element-overview/#sidebar
https://docs.generatepress.com/article/layout-element-overview/#content-1Let me know if this helps π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 20, 2020 at 10:23 am #1369949Matt
Hey Leo! I took a look and tried a few things. I think I’m misunderstanding (or I miscommunicated).
I explained the scenario here: https://www.loom.com/share/bf3c27ecb6dc49d3b816f6419a7caeb5
Please let me know your thoughts. Thanks!!
July 20, 2020 at 3:16 pm #1370165Tom
Lead DeveloperLead DeveloperHey Matt,
You could do something like this:
.no-sidebar .site-content { max-width: 860px; margin-left: auto; margin-right: auto; }
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 26, 2020 at 7:45 pm #1377391Matt
Hey Tom! Thanks! While it does reduce the content width, is there a way to also make the “body” centered on the page so it’s not left-aligned like this?:
https://gyazo.com/3027ae3aec17a0950db4a8e09abc227dThanks!
July 26, 2020 at 9:28 pm #1377440Leo
StaffCustomer SupportCan you link me to the page in question?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 27, 2020 at 8:35 am #1378174Matt
Sure thing: [LINK] – Thanks!
July 27, 2020 at 8:53 am #1378196Leo
StaffCustomer SupportJuly 27, 2020 at 9:14 am #1378228Matt
It works perfectly! Thanks Leo!!
July 27, 2020 at 9:16 am #1378232Leo
StaffCustomer SupportNo problem π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.