I am trying to create multiple progress bars using Bootstrap 4 with labels or text on the outer left side. Currently, the bars are appearing like an inverted stair when multiple bars are added.
https://i.sstatic.net/zHhfX.png
Here is the code I have so far:
<div class="container">
<p class="progress-label">
C#
</p>
<div class="progress" id="prog1">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">20% Complete</span>
</div>
</div>
</div>
<div class="container">
<p class="progress-label">
C#
</p>
<div class="progress" id="prog1">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">20% Complete</span>
</div>
</div>
</div>
and here is the CSS code:
.progress-label {
float: left;
margin-right: 1em;
}
This code was taken from How to put a label side by a progress bar with bootstrap?
I am struggling to align the bars properly. Any suggestions on how to fix this alignment issue?
Here's a fiddle: