I'd like to create something like this:
https://www.w3schools.com/howto/howto_js_collapsible.asp
But it should expand (and collapse) both vertically and horizontally. You can imagine it as a button that expands into a big div. But, in fact, it is the entire div that should expand, the button being just a part of it (inside the div).
Here is some hinting HTML:
<div class="section">
<button type="button" class="collapsible">
Open collapsible
</button>
<div class="collapsible-content">
<p>Lorem ipsum...</p>
</div>
</div>
I need to expand not only the "collapsible-content" div, but rather the "section" div. To lengthen it and to broaden it at the same time. Animated lengthening and broadening would be a "nice-to-have" feature, not quite necessary.
Could you, please, advice CSS and/or JavaScript appropriate to achieve this? I don't want to employ any jQuery, Bootstrap, or stuff like that.
Thanx Pavel