Create boxes with automatic hight for expandable text

Question:
How can I change a box/container to change the hight according to the lenght of the content?

Product:
I am working in Wix Editor

What are you trying to achieve:
I want to create an FAQ site featuring 2 tabs. In each tab I have one repeater which features many containers. In each container I have a text which poses the question, an expandable/collapsible text which gives the answer plus a one button for expand and one button for the link to the full help article. All containers should be the same hight at first. If the answer is longer, the “more button” will appear and when I click the box should expand with the text making the full version visible. The questions and answers are pulled from my CMS database.

What have you already tried:
I have the working code for everything. But the boxes dont expand accordingly, so the longer text is not visible. I dont see fixed position so I can not uncheck that box, I also dont see automatic hight to content, so I cant check that. I instead cleared the hight of the container to no value.

Have you tried Wix’s FAQ app? It seems it would accomplish much of what you are trying to do. Adding and Setting Up the Wix FAQ App | Help Center | Wix.com

1 Like

Thx Dena, yes I tried that already and yes it does look nice and gives me what I need within ONE tab. But as I have 2 tabs I cant set up 2 FAQ databases. So just to explain a little further. I have 2 tabs for “operations” and “administration”. Within those tabs I have 4-6 kategories with 2-8 questions each.

Still sounds very doable with the FAQ.

Rough setup:

  • Tab element (with 2 tabs - one for ‘Operations’, one for ‘Administration’)
  • 1 FAQ widget in each tab
  • Adjust the settings of each FAQ widget, so that only the relevant categories show

And you’ll end up with something a little like this - https://noahlwix.wixsite.com/my-site-4

1 Like

Seems Noah has pointed you to a solution. Good luck.