Guest Posted October 4, 2021 Share Posted October 4, 2021 18 hours ago, tuanphan said: For future comments, to use @DV2 code, add a Code Block >> Paste this code This worked great! But how do I remove the padding on mobile? It looks like the attached pic now. Tried to add the following but didn't change anything: @media screen and (max-width:767px) { #block-yui_3_17_2_1_1633265646658_24065 { padding-left: 0; padding-right: 0; } } Link to comment
DV2 Posted October 4, 2021 Share Posted October 4, 2021 Thanks for the tip and catching my sloppy closing tag. :) Link to comment
DV2 Posted October 4, 2021 Share Posted October 4, 2021 12 hours ago, bluepeach said: This worked great! But how do I remove the padding on mobile? It looks like the attached pic now. Tried to add the following but didn't change anything: @media screen and (max-width:767px) { #block-yui_3_17_2_1_1633265646658_24065 { padding-left: 0; padding-right: 0; } } For display purposes I gave the accordion a fairly narrow width. Try replacing the first line of CSS with this. It will expand to the width of the container, aka be responsive. .accordion{width:100%; margin:2em auto;} Link to comment
Guest Posted October 5, 2021 Share Posted October 5, 2021 10 hours ago, DV2 said: For display purposes I gave the accordion a fairly narrow width. Try replacing the first line of CSS with this. It will expand to the width of the container, aka be responsive. Perfect! Thank you so much. Link to comment
DavidCliff Posted October 25, 2021 Share Posted October 25, 2021 This works great for me on desktop, but when I click the "question" on mobile it skips to the top of the page. Any ideas? I presume it's something to do with: href="#" Link to comment
Beyondspace Posted October 26, 2021 Share Posted October 26, 2021 4 hours ago, DavidCliff said: This works great for me on desktop, but when I click the "question" on mobile it skips to the top of the page. Any ideas? I presume it's something to do with: href="#" Can you share your site with protected password for easier checking? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
tuanphan Posted October 27, 2021 Share Posted October 27, 2021 On 1/15/2017 at 5:18 AM, dizzyd said: I discovered that Squarespace doesn't have any accordion/toggle styling that can be used for FAQs, etc. I was directed to come here and ask how to do it. I was hoping to have something that looks like this (see attached image)./storage/temp/4657-zzz305-20170114-1412.jpg Squarespace updated an Accordion Block. Now you can add it without using custom code Spark_Plugin 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Spark_Plugin Posted November 16, 2021 Share Posted November 16, 2021 For anyone wanting to make a custom accordion, I made this guide. - Rasmus Myhrberg, Founder of Spark Plugin Spark Plugin – The Ultimate Design Toolkit for Squarespace Link to comment
DavidCliff Posted November 17, 2021 Share Posted November 17, 2021 On 10/27/2021 at 2:53 PM, tuanphan said: Squarespace updated an Accordion Block. Now you can add it without using custom code Finally! tuanphan 1 Link to comment
Amaya_SQSP Posted February 23, 2022 Share Posted February 23, 2022 Hi @dizzyd, I see that you were looking for a solution to create an accordion on your site and may have used some custom code to try to create it. I'm happy to say that should you want to add an accordion to your site without additional code, you can do so using the accordion block! We have some information about the possibilities and customizations of the accordion block in our guide "Accordion blocks" should you want to take a look. Happy site building! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment