Changing post width?

I would like to make the width for my posts (and also pages) to be a bit wider.

I know it’s possible by changing it in CSS or using Code Injection. But I can’t figure it out.

I’ve included a screenshot of what I wanted to do

There’s lots of ways to do this and lots of variables. Are you able to share a URL of your site, so we can see the code?

Yes, here is the link to my site.

Thanks!

The width is being defined by the CSS class .col-lg-6. You could increase the width by increasing the 50% below to something higher and adding it to your Site Header under Settings > Code Injection. Because this class could be used on other parts of your site, you’ll need to see if it messes any other pages up.

<style>
@media (min-width: 992px) {
  .col-lg-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}
</style>

Here it is set to 85%, for example:

I tried setting it to 85% via Code Injection but it’s not working, when I inspect the element, it is still at 50%.

I also tried modifying it in the css.grid, I then re-upload the theme, but when I inspect element again it is still at 50%.


I’m not sure what I’m missing here?

I can tell that the CSS isn’t being applied. :thinking: I looked over my CSS and noticed thatI left out a bracket. Whoops! I’ve fixed it, so please make sure it matches what you have in your code injection. If it’s still not working, can you share a screen shot of your code injection page?

1 Like

It’s working now! Thank you, Ryan!

1 Like