[Resolved] Extend page section width to browser width and beyond site container paddings

Home Forums Support [Resolved] Extend page section width to browser width and beyond site container paddings

Home Forums Support Extend page section width to browser width and beyond site container paddings

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #681046
    George

    I have a section that is 100% wide but still inherits the container global padding from the Customizer. Is there a way to bypass that and just have the section expand to the browser’s full width but keep my custom container width of 1300px?

    GeneratePress 2.1.4
    GP Premium 1.7.2
    #681054
    George

    Ok, it seems that settings zero left and right paddings to the custom section class didn’t cut it but there is the generate-sections-inside-container class that I managed to reset and get the full width. I would maybe suggest for the next GP Premium version to have a Left and Right Padding settings in addition to the Top and Bottom Padding ones for the Sections.

    #681057
    David
    Staff
    Customer Support

    Aside of using GP Sections to build out the page, there are several CSS methods, the simplest of which is this:

    .full-width-section {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }

    It will only work correctly if the parent container is centered. So no sidebars or things go pear shaped.

    #681068
    George

    Hmm yeah, thanks, David. Too many things need to be in control with this solution, it seems. I tried it with parent container centered and no sidebars and things did went pear-shaped! Sections worked much better in my example.

    #681078
    David
    Staff
    Customer Support

    Yes it does take some tinkering. GP Sections is the best way to go in your instance.

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