[Support request] full width container for CPT single layout

Home Forums Support [Support request] full width container for CPT single layout

Home Forums Support full width container for CPT single layout

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1019471
    jasond

    How can I make the CPT single layout to have max width 100% like what I’m seeing below when using Sections on Pages

    .sections-no-sidebars.generate-sections-enabled .container.grid-container, .sections-sidebars.no-sidebar.generate-sections-enabled .container.grid-container {
    max-width: 100%;
    }

    Instead

    .container.grid-container {
    width: auto;
    }

    I need to add some full-width sections on CPT layout so this would be really helpful

    Thanks a lot

    #1019751
    David
    Staff
    Customer Support

    Hi there,

    have you tried the Layout Element ?

    https://docs.generatepress.com/article/layout-element-overview/

    #1020163
    jasond

    thanks a lot!! i haven’t checked it out before

    #1020388
    David
    Staff
    Customer Support

    You’re welcome

    #1021053
    jasond

    Can you advise the HTML markup I need to add to my single-cpt.php if i want to create a full-width section with contained inner box type?

    Thanks

    #1021362
    Tom
    Lead Developer
    Lead Developer

    Not too sure what you mean? If you’re adding HTML to a template file, you can do this:

    <div class="full-width-section">
        <div class="contained-section">
    
        </div>
    </div>

    .full-width-section is full width by default, unless it has a contained container.

    .contained-section needs CSS to contain itself:

    .contained-section {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    #1021615
    jasond

    Thank you Tom, is there any ready class for contained-section I can use without having to create and CSS a new one?

    #1021683
    David
    Staff
    Customer Support

    The grid-container class is used in GP to set the content width

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