I need to develop a responsive progress bar that adjusts its width dynamically. However, when I set the width to auto, the progress bar line becomes detached from the stars. How can I resolve this issue and make the progress bar responsive on mobile devices, with the line of progress being vertical?
Progress Bar with Fixed Width: https://i.stack.imgur.com/n3yu7.png
Progress Bar with Auto Width: https://i.stack.imgur.com/zs2KF.png
.progress-bar {
width: 750px;
display: flex;
margin: 40px 0;
}
.progress-bar .step {
text-align: center;
width: 100%;
}
.progress-bar .step .bullet {
position: relative;
height: 25px;
width: 25px;
display: inline-block;
}
.progress-bar .step:last-child .bullet:before,
.progress-bar .step:last-child .bullet::after {
display: none;
}
.progress-bar .step .bullet:before,
.progress-bar .step .bullet::after {
position: absolute;
content: "";
height: 3px;
right: -136px;
bottom: 11px;
width: 142px;
background: #C1C1C1;
}
.active-bullet {
z-index: 1;
}
.active-check {
z-index: 2;
}
<div class="progress-bar">
<div class="step">
<div class="bullet active-bullet">
<img src="star-pb-active.svg">
</div>
<div class="check active-check" style="
border-bottom: 2px solid black;
padding: 2px;
DISPLAY: table-cell;
LEFT: 40px;
POSITION: relative;
">Order placed</div>
</div>
<div class="step">
<div class="bullet">
<img src="star-pb.svg">
</div>
<div class="check">Jewelry Creation</div>
</div>
<div class="step">
<div class="bullet">
<img src="star-pb.svg">
</div>
<div class="check">Packing & Quality Control</div>
</div>
<div class="step">
<div class="bullet">
<img src="star-pb.svg">
</div>
<div class="check">Shipped</div>
</div>
<div class="step">
<div class="bullet">
<img src="star-pb.svg">
</div>
<div class="check">Estimated Delivery</div>
</div>
</div>