Site logo

Archived topic

full width container for CPT single layout

7 replies · Started by jasond on September 26, 2019

Viewing posts 1–8 of 8

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

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

You're welcome

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

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;
}

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

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

This archived topic is closed to new replies.