I'm currently working on mastering Bootstrap. My goal is to have a prominent heading followed by three small badge-pills that are horizontally centered on the page. However, I've run into a couple of issues:
1- The badge-pills are appearing stacked together without any spacing in between them, possibly due to the push-right. To resolve this, I had to add an empty "badge-pill" which may not be the most ideal solution.
2- The alignment of the header and badge-pills is not perfect horizontally, and I haven't been able to find a fix for this yet. Any help would be greatly appreciated.
Edit: After looking at it again, what I'm trying to achieve seems quite similar to a Navbar. I'm guessing there might be a simpler way to accomplish this.
Code:
<div class="container border p-3">
<span class="h2 align-middle">Heading 1</span>
<span class="badge badge-pill badge-dark align-middle p-2 pull-right">Top</span>
<span class="badge badge-pill badge-light pull-right"> </span>
<span class="badge badge-pill badge-dark align-middle p-2 pull-right">Prev.</span>
<span class="badge badge-pill badge-light pull-right"> </span>
<span class="badge badge-pill badge-dark align-middle p-2 pull-right">Next</span>
</div>
fiddle:code