Liquid, JavaScript, themes, sales channels
Hi there,
I am new to Shopify and I have what I am sure is a very basic newbie question. I just added the collection description code so it now shows on the collection page. However I would like to edit the code so text doesn't span the full width of the page. Would some one be able to suggest how I can edit this code to account for that?
This is what I have. I am just not sure how to edit it to add padding/margin to just the description.
<div id="colect-descr">{{ collection.description }}</div>
Thank you!
Solved! Go to the solution
This is an accepted solution.
Hi @bmdevv,
Please follow the steps:
- Step 1: Go to Online store > Themes > Actions > Edit code.
- Step 2: Go to Asset > theme.min.css.liquid and paste this at the bottom of the file:
#colect-descr{
padding: 0px 15px 15px 15px;
}
Please refer this code here: https://www.w3schools.com/css/css_padding.asp
Hope this helps!
To your main CSS file (probably theme.scss.liquid or similar) you'd add something like:
#colect-descr {
padding: 5px;
margin-top: 5px;
}
Hello @bmdevv,
Please share:
- your store URL;
- page URL with the issue you mention;
- storefront password (if your store has one).
If the store is not online yet, please follow this quick tutorial to learn how to safely and temporarily share an offline/unpublished theme URL.
Kind regards,
Diego
Hi Diego,
The store is thegoodlane.myshopify.com - the page I would like to add the margin on is: https://www.thegoodlane.com/collections/subscription-box
Thanks for your help!
This is an accepted solution.
Hi @bmdevv,
Please follow the steps:
- Step 1: Go to Online store > Themes > Actions > Edit code.
- Step 2: Go to Asset > theme.min.css.liquid and paste this at the bottom of the file:
#colect-descr{
padding: 0px 15px 15px 15px;
}
Please refer this code here: https://www.w3schools.com/css/css_padding.asp
Hope this helps!
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024