I am attempting to create an ordered list with collapsible sections inside the li
elements. The goal is to display basic information about a specific context, and when clicking on a link, additional details are shown. While the code is functional, I am facing an issue where the numbering (1.
) is not properly aligned vertically with the content (Click to collapse
). As someone who is not an expert in CSS, I am seeking guidance on how to address this alignment problem. Can anyone provide assistance?
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="14767b7b60676066756454213a243a26">[email protected]</a>/dist/js/bootstrap.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="06646969727572746776463328362834">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet"/>
<ol class="list-group list-group-numbered">
<li class="list-group-item">
<div class="d-flex justify-content-between align-items-start">
<div class="ms-2 me-5">
<div class="fw-bold">
<a aria-expanded="false" aria-controls="collapseExample" data-bs-toggle="collapse"
href="#collapseExample">Click to collpase</a>
</div>
some information
</div>
<div class="ms-2 ms-5 me-auto">
some more information
</div>
<span class="badge bg-primary rounded-pill">42</span>
</div>
<div class="collapse" id="collapseExample">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Foo, Bar</th>
<th>Foobar</th>
<th>FoobarBaz</th>
<th>Baz</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</li>
</ol>