JSFiddle - React, Tailwind, and code Playground
by Ismail Ibraheem Shurrab
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="stepwizard">
<div class="stepwizard-row">
<div class="stepwizard-step">
<button type="button" class="btn btn-danger btn-circle">1</button>
<p>Cart</p>
</div>
<div class="stepwizard-step">
<button type="button" class="btn btn-primary btn-circle">2</button>
<p>Shipping</p>
</div>
<div class="stepwizard-step">
<button type="button" class="btn btn-success btn-circle" disabled="disabled">3</button>
<p>Payment</p>
</div>
</div>
</div>
CSS
body{margin:40px;}
.stepwizard-step p {
margin-top: 10px;
}
.stepwizard-row {
display: table-row;
}
.stepwizard {
display: table;
width: 100%;
position: relative;
}
.stepwizard-step button[disabled] {
opacity: 1 !important;
filter: alpha(opacity=100) !important;
}
.stepwizard-row:before {
top: 14px;
bottom: 0;
position: absolute;
content: " ";
width: 100%;
height: 1px;
background-color: #ccc;
z-order: 0;
}
.stepwizard-step {
display: table-cell;
text-align: center;
position: relative;
}
.btn-circle {
width: 30px;
height: 30px;
text-align: center;
padding: 6px 0;
font-size: 12px;
line-height: 1.428571429;
border-radius: 15px;
}