-
Lysann
Hi Team,
new day, new challenge: i searched in the forum and asked ChatGPT if it’s possible to build something like this https://imgur.com/vo8vWre – is that possible? I tried and played around with the accordeon block but that’s not working.
If it’s not possible do you have an idea if there’s a workaround?
Thank you! -
Hi there,
Yes, you can add an accordion block to another accordion block’s Accordion content block.
-
Lysann
Hi Ying,
Great, that works.
I don’t want to have any borders for the accordions and tried these selectors with CSS(display: none !important), but that doesn’t work:
.gb-accordion__item-open>.gb-accordion__content
.gb-accordion__content
The margin-bottom should be set to 0, too, but that is not working.
I could set it for each accordion item separately, but that would create too much extra CSS, I’d say?
Could you help me with the right selector, please? Thanks! -
I don’t think you need to use any CSS to remove the borders.
The borders are set at borders panel, you can remove the border width value, then there’s no border.
The margin-bottom should be set to 0, too, but that is not working.
Can you link me to the page in question? And password to view the page.
-
Lysann
I could remove the border property and set the margin-bottom to 0, but it doesn’t change.
I added the page to the private information. -
I see an issue in this section. The section has multiple accordion blocks inside the root accordion’s accordion item block. Why not just use one accordion block with multiple accordion items instead?
Let me know 🙂
-
Lysann
Yes, it’s because the design is set like that: please see this screenshot here: https://imgur.com/I6ayuGI
There are different topics covered so the user has to first untoggle the topic and then find in each topic different questions. That’s why i use an accordion for the topics and then for the actual questions. Is there another way to build that? -
Yes, you only need to use 1 accordion with multiple accordion items for the actual questions.
https://app.screencast.com/o6vvxVAFCNEUv -
Lysann
That’s what i have I’d say – here’s a screenshot from the container structure: https://imgur.com/vEiv5du. There’s one accordion item and in the Accordion content are the containers with the different questions. There i need to set the margin to “0”.
-
You still didn’t understand what I mean. Then never mind. Let’s focus on your question.
Each accordion item has a
margin-bottomset to1em.Try removing the
margin-bottom. -
Lysann
No, I don’t understand it.
I tried to remove it but it doesn’t change.
-
Can you provide an admin login to your site?
The user/password you attached in the private info field doesn’t work.
-
Lysann
Sure, i added the login in the private field.
-
Alvind
Hi there,
There’s one accordion item and in the Accordion content are the containers with the different questions. There i need to set the margin to “0”.
Select each Container and remove the top margin value currently set to 1em. Then, check each Accordion Item block inside the container and remove its bottom margin value as well.
-
Lysann
After getting feedback on the design we leave the margin now as it is…
The other question was regarding the structure of the accordion what i don’t understand – i added another section now to demonstrate the structure: we have different accordion items for each topic and in each accordion item different containers which hold the questions per topic. Is that correctly built then?
I hope you understand what i am trying to explain. I want to avoid to add too much containers in each other when there’s a more efficient way. Thank you!
-
Regarding the structure issue, you only need 1 accordion block for the 3 topics, then in each of the accodion items, add another accordion block for the questions and answers.
So in total, you only need 4 accordion blocks.
I’ve made an example below the section, you can have a look.
- You must be logged in to reply to this topic.