Currently exploring Bootstrap 5 and still getting the hang of it - so please bear with me if this question seems a bit rudimentary!
I've been experimenting with tabs to create tabbed panes of local content. I've followed the code provided in the documentation found here: https://getbootstrap.com/docs/5.0/components/navs-tabs/#javascript-behavior
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="contact-tab" data-bs-toggle="tab" data-bs-target="#contact" type="button" role="tab" aria-controls="contact" aria-selected="false">Contact</button>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">...</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">...</div>
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">...</div>
</div>
Everything functions perfectly. It also responds well to justify-content, making it easy to center or distribute the tabs, which is exactly what I need.
However, I'm struggling to get them to split using auto margins (mr-auto and ml-auto) so that, for instance, the first two tabs align on the left and the last one on the right. When I include them in the ul tag, it seems to be ignored (even though the justify-content works fine).
I'm aiming to achieve something similar to what's shown in the flex documentation: https://getbootstrap.com/docs/4.0/utilities/flex/#auto-margins or on Wikipedia where the article and talk tabs are on the left, and the read, edit, and history tabs are on the right. Any ideas on how I could accomplish this?