I have been struggling with a CSS issue involving a progress bar that displays the remaining time. No matter what I do, the time text keeps moving to the left as the progress bar narrows. I have tried numerous methods to keep the text centered and prevent it from shifting, but nothing seems to work. Any assistance would be greatly appreciated!
CSS:
.progress {
background: rgba(255,255,255,0.1);
justify-content: flex-start;
border-radius: 100px;
align-items: center;
position: relative;
padding: 0 5px;
display: flex;
height: 20px;
width: 300px;
}
.progress-value {
box-shadow: 0 10px 40px -10px #fff;
border-radius: 100px;
background: red;
height: 15px;
}
The div (the div with the ID timer needs to be in the middle of the progress bar and it should not move while the progress bar is decreasing!)
<div class="progress">
<div id='progress' class="progress-value"><span id='timer' style="display: inline; width: 300px !important;"></span></div></center></div></center>