Remove container for single section of a blog post

For some blog posts I would like to have a single section not have a container but instead be full width; while leaving the rest of the post in a container as is the default.

There is an excellent old forum post here which describes how to remove the container for an entire individual post by using this CSS:

.single-post .site > .x-container.max.width.offset {
width: 100%;
max-width: 100%;
margin: 0 auto;
}

.single-post .entry-wrap{
padding: 0;
}

I’d like to achieve the exact same effect but only for a single section.

I’ve attempted leveraging this CSS by applying it in the sections element CSS section using $el but am not able to get it to work. Any suggestions? It occurs to me this might simply not be possible and that instead I’ll have to apply margins to the sections of the post I want to appear to be inside a container.

Hi @jasonixr,

Thank you for writing in, yes you need to apply that CSS first to make your posts single page a fullwidth.

Then Remove the spacing of the section that you want to go fullwidth



The rest of the section should not go fullwidth because it has an inner container set on it.

If that did not work, please provide us a direct URL of the posts.

Hope it helps,
Cheers!

This worked perfect, thanks!

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.