I'm using click expand collapse using <details>
and <summary>
tags.
It can expand and collapse without problem.
I want to expand one information only one time.
What I meant is, when I click information1 it will expand, and again click information2. then information1 collapse and information2 expand. it means only one can expand in one time.
How can I do this with only using css
<details>
<summary>Information1</summary>
If your browser supports this element, it should allow
you to expand and collapse these details.
</details>
<details>
<summary>Information2</summary>
If your browser supports this element, it should allow
you to expand and collapse these details.
</details>
<details>
<summary>Information3</summary>
If your browser supports this element, it should allow
you to expand and collapse these details.
</details>
<details>
<summary>Information4</summary>
If your browser supports this element, it should allow
you to expand and collapse these details.
</details>
https://fiddle.jshell.net/mjxhj5se/
Thanks..