[Resolved] WordPress 5.0 & Container Width

Home Forums Support [Resolved] WordPress 5.0 & Container Width

Home Forums Support WordPress 5.0 & Container Width

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #787209
    Steve

    For Gutenberg, it would be great if GP had a third container width.

    If Container is set to blog width (say 800px), that’s too narrow for a home page, for example.

    Adding margins to Full Width appears to require different CSS classes for different Gutenberg block types (and I’m not a CSS guy).

    Is some way emulate a third container width, say 1,500 px?

    #787279
    Leo
    Staff
    Customer Support

    Hi there,

    So you want to change the container of the home page only?

    If so try this:

    body.home .site.grid-container {
        max-width: 1500px;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know πŸ™‚

    #787295
    Steve

    Thanks. That works for home.

    What would be the approach for other individual pages?

    #787300
    Leo
    Staff
    Customer Support

    You can keep adding on the CSS:

    body.home .site.grid-container,
    body.page-id-xxx .site.grid-container {
        max-width: 1500px;
    }

    We could do it a different way if there is certain logic as well. Like all single posts would be:

    body.single .site.grid-container, {
        max-width: 1500px;
    }

    Everything except the single posts would be:

    body:not(.single) .site.grid-container, {
        max-width: 1500px;
    }

    You get the idea πŸ™‚

    #787318
    Steve

    Thanks, Leo!

    #787335
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

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