Hey guys, I want to add space in the collapsible content section.
This is how it looks on my store:
And this is how I want it to look:
So I want to add more space between the questions and the answers, like in the second picture.
Here’s my store: https://1049xn-ya.myshopify.com/products/editing-masterclass
(Just scroll all the way down to see the collapsible content section.)
And here’s the link to the store where I like the design: https://tomnoske.store/products/cinema-luts
(Just scroll all the way down to see the collapsible content section.)
I WANT THIS CHANGE FOR BOTH DESKTOP AND MOBILE.
Thanks a lot,
Tim
1 Like
Hi @CreatorTim
Try this one.
- From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
- Find the theme that you want to edit and click on “Actions” and then “Edit code”.
- In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
.collapsible-row-layout .accordion .accordion__content {
padding-top: 20px !important;
}
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
1 Like
Hi. This approach will update the existing code for these collapsible components:
- From the Shopify Admin home page, select “Online Store” > “Themes”.
- Then find your currently published theme (the one at the top of the page with the label “current theme”).
- Click the “…” button (adjacent to the “Customize” button), then “Edit code”.
- In the filter search, type “component-accordion.css”. It will be under the “assets” folder.
- Within that file, search for “accordion__content”.
- That should give you this section of code:
.accordion__content {
margin-bottom: 1.5rem;
word-break: break-word;
overflow-x: auto;
padding: 0 0.6rem;
}
- Add a line to generate this (update “15px” to whatever number you like):
.accordion__content {
margin-bottom: 1.5rem;
word-break: break-word;
overflow-x: auto;
padding: 0 0.6rem;
margin-top: 15px;
}
If you need assistance with any of this, feel free to respond to this post.
1 Like