Expand Accordion Horizontally Upon Click?

Hi,
I’m trying to figure out how to have an accordion initially set at a given width, but when you click on it to show the dropdown it also expands horizontally while it opens

Screenshot below as a visualization of what I’m trying to accomplish:

My hope was I could modify the existing CSS controls to get it to work, something along the lines of…

$el {
width: 40em;
}

$el [aria-expanded*=“true”] {
width: 70em;
}

And while the first part worked (setting the initial size), the second part (getting it to change sizes on click) not so much.

Any help on this would be greatly appreciated!

1 Like

Hi Matthew,

Regretfully, It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

To give on an idea, you need a jquery code to be able to modify the width of the parent container on click.

Thanks for understanding. Take care!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.