Add Margins to Custom Liquid in Craft Theme (Product Page)

I want to add margins to a custom liquid section. As you can see in the screenshot below, the other sections of my product page has margins but the custom liquid section hugs the edges of the screen. What do I need to do to add margins? Thank you.

@A-KR - can you please share the page l ink where you have this custom section?

Hello,

Based on the screenshot provided, you can make use of the below custom CSS code:

.product-single__description {
margin-left:250px;
margin-right:250px;
margin-top:50px;
margin-bottom:50px;
}

The above CSS would target the element from within your screenshot.

To change the entire page element, you’d want to use something similar to the below (this would work only if your page container has the class container, it may differ from theme to theme):

.container {
width:100%;
max-width:100%;
margin:0;
padding:0;
}

Cheers!

Hello, this works great on desktop mode but on mobile, it’s pushed in too far. Instead of px, can I do a percentage? For example, the margin should only be 5% of the page or something like that. Would that fix this error?

I was able to fix the issue by changing px to %. Now it looks great on mobile and desktop. Thank you!