Site logo

Archived topic

Content width on full-width pages, aka Content (no sidebars) via CSS

9 replies · Started by Matt on July 19, 2020

Viewing posts 1–10 of 10

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!

Hey Matt,

You could do something like this:

.no-sidebar .site-content {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

Let me know :)

Can you link me to the page in question?

Sure thing: [LINK] - Thanks!

It works perfectly! Thanks Leo!!

No problem :)

This archived topic is closed to new replies.