Overide Xcontainer for Post Only

Hi,

I am creating a custom post layout and following best practices, using child theme, etc. But I have an issue. I want the ONLY the post layout to be 100%, so the featured image will be 100%, and also some content items need to be 100%.

I am modifying this class:
class=“x-container max width offset”

with this overriding css:
.x-container.max {max-width: 100%;margin:0px}
.x-container.width {width:100%;}

But it, of course, effects the whole site. Is there a way to just make this change for Posts?

Thanks!

Hi Andrew,

Thank you for writing in, you can update your CSS code below to apply it specifically on single posts page only.

body.single .x-container.max {max-width: 100%;margin:0px}
body.single .x-container.width {width:100%;}

You can find the proper CSS code selector using the Chrome browser Developer Toolbar
For the CSS code itself, I suggest that you get started with this tutorial

Hope it helps,
Cheers!

Thanks. You guys are awesome!

You are most welcome. :slight_smile:

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