Jump to content

[Share] Accordion Block: Useful code

Go to solution Solved by Parker_SQSP,

Recommended Posts

Posted (edited)
13 hours ago, tuanphan said:

You mean increase width of this red box?

image.thumb.png.bf3856af7e19db9b41c08da78424b559.png

Yes, primarily.

I also run into the problem further down that the second child is below the first, not on the right if that makes sense. You see the red background item is below the yellow one where there are more that one listing, but to the right when there are only one listing.

Like:

1  4

2  5

3  6

But:

1  2

Where there are only one item, and one price. It makes targeting the right "cell" tricky. Any way around that?

EDIT: I had to abandon the idea, spent way too much time on that price list, we will survive without the prices aligned to the right! Thank you anyways 🙂

Edited by CHP7
Had to move on due to time constriants
Link to comment
  • 3 weeks later...

Hi Tuan! I looked through your post on customizing the accordion but did not see anyone ask if there is a way to move the minus icon below the content when an accordion item is open (see image attached). Can you please let me know how to achieve this? Thanks!

The site is: preservationcompany.com

pw: egg@nQ2QscVGd@z

Screenshot 2024-06-17 at 3.54.46 PM.png

Link to comment
57 minutes ago, Mir said:

if there is a way to move the minus icon below the content when an accordion item is open (see image attached).

The minus and title are part of the same parent element so we can't use a relatively simple CSS solution to attempt to change the position of the minus. I think some JavaScript might be able to help with an effect like this but I do not know of code that does this.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
On 6/18/2024 at 3:01 AM, Mir said:

Hi Tuan! I looked through your post on customizing the accordion but did not see anyone ask if there is a way to move the minus icon below the content when an accordion item is open (see image attached). Can you please let me know how to achieve this? Thanks!

The site is: preservationcompany.com

pw: egg@nQ2QscVGd@z

Screenshot 2024-06-17 at 3.54.46 PM.png

I remember I sent code for you to achieve this (Use CSS absolute), not sure where, email or message or on another thread, you try check again.

Edited by tuanphan

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.