Add side padding or change max width on a custom liquid section

Topic summary

A user with the Craft theme created a custom collection page section using Page Crafter. The custom liquid section displays correctly but extends edge-to-edge without left/right margins or padding.

Issue: The custom section lacks side padding and needs max-width constraints to match the rest of the page layout.

Solution provided:

  • Navigate to Online Store > Themes > Assets folder
  • Open the main CSS file (main.css, base.css, style.css, or theme.css)
  • Add CSS targeting the specific custom liquid section class
  • Apply max-width: 100% and appropriate padding

Key consideration: The responder noted that individual sections may need to be targeted one-by-one rather than applying max-width globally to all elements. They requested clarification on whether all sections should have max-width or only specific divs need margin adjustments.

The discussion includes a screenshot showing the problematic section and CSS code snippet for implementation.

Summarized with AI on November 5. AI used: claude-sonnet-4-5-20250929.

Hello,

I have the craft theme and I built a custom collection page using the app Page Crafter. Basically I created the part of the page I want to go on my collection page just below the collection products, so essentially a long custom section of the collection page. Page Crafter let’s me copy the code so I can add it into my custom collection page by adding a section of </> Custom Liquid option. The only issue is the edges go all the way to right and left margins and gets cut off. How can I add some right and left padding or max width within the code of the section Custom Liquid or is that even possible? Thanks!

1 Like

Tried to add a screenshot but couldn’t.

Hi @b7huff

Would you mind to share your Store URL website? with password if its unpublish. Thanks!

www.thesterileguy.com

Actual collection page with the custom liquid section is www.thesterileguy.com/collections/crcst-essentials

Thanks for the info, Do you mean this section right?

Do you like all of theme to be on max width?

If it is,

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

.page-width.page-width--isolate.section-template--23591312326944__custom_liquid_mjtYC9-padding {
    max-width: 100%;
}

And save.

If you want some of them will max max width, we need it to call theme one by one.

Like this for example:

Need to identify which div is need to margin or not.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!