[Resolved] Single-column + center pages option CSS

Home Forums Support [Resolved] Single-column + center pages option CSS

Home Forums Support Single-column + center pages option CSS

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #882299
    JC

    Hi. I’m trying to create a simple option for centering a page when I remove the sidebar and select the Content (no sidebars) option.

    I know it’s a few changes in the CSS, but I’m not sure what divs to select.

    For admins, I gave a link to a page I’d like to center and make the column width something like 70-80% so it’s not spanning the entire 1100 pixels wide.

    sidebar options: https://imgur.com/5g2QHUt

    #882352
    Leo
    Staff
    Customer Support

    Hi there,

    What if we do something like this?

    body.no-sidebar .site {
        text-align: center;
    }

    Let me know 🙂

    #882384
    JC

    Sorry, that was bad wording on my part. I’m not trying to center a page. I’m trying to narrow the content area so it’s not spread so far across the screen.

    I just made some changes in the CSS to show you what I’m trying to do, but they’re not correct because it doesn’t work well on mobile… so I’m probably not selecting the right div to make changes to.

    page for reference: https://jcdfitness.com/online-personal-trainer/ and then screenshot to see how it looks after I made the changes: https://imgur.com/WxXLJbk // you’ll notice the CSS changes I made.

    #882388
    Leo
    Staff
    Customer Support

    Would this option help?
    https://docs.generatepress.com/article/layout-element-overview/#content-1

    You can set a specific width starting in 1.8.

    #882398
    JC

    hmmm, looks like it would be handy, but when I go to create a new Layout element and select the container area (it’s no longer content), you can’t specify a width.

    #882474
    JC

    the more I look at the example, the more I think that the screenshot is old and the width function is no longer available?

    #882475
    JC

    actually, scratch that. I had to update my plugin… I wasn’t aware there was an update. SOLVED!

    #882518
    Leo
    Staff
    Customer Support

    Awesome.

    Make sure to check out all the new features here:
    https://generatepress.com/gp-premium-1-8/

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