I am currently working on a Bootstrap accordion, and I have a specific layout in mind. I want to display text on both the left and right sides of the accordion header, right next to the arrow that expands and collapses the content:
https://i.sstatic.net/dnqXK.png
Here is the current structure of my accordion:
<div class="accordion accordion-flush" id="accordion-tracks">
<div class="accordion-item">
<h2 class="accordion-header" id="heading-1">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-1" aria-expanded="false" aria-controls="collapse-1">
<div class="d-flex justify-content-between w-100">
<div>1. The Eater Of Dreams</div>
<div style="padding-right: 10px;">0:52</div>
</div>
</button>
</h2>
....
I'm unsure if using a button
for this purpose is best practice. I've also experimented with using span
and playing around with float-start
and float-end
, but it doesn't seem to achieve the desired result.
Any advice or suggestions would be greatly appreciated. Thank you!