html - Segmented Progress Bar in Bootstrap 3 -


i have webpage user needs enter data. once enter 10 items, can continue.

i'm trying create progress bar visually represent how many items have entered/have left enter.

here image of i'm trying create

segmented progress bar

so far, closest i've gotten using bootstrap's stacked progress bars. however, stacked bars, the unfilled section single unbroken region - doesn't show how many segments left. here's fiddle showing mean.

here's markup fiddle:

<div class="container">     <div class="progress progress-bar-segmented">         <div class="progress-bar" style="width: 10%"></div>         <div class="progress-bar" style="width: 10%"></div>         <div class="progress-bar" style="width: 10%"></div>     </div> </div> 

i've searched similar examples adapted meet needs, haven't had luck. i'm not sure should searching or call this. maybe considered step-wise progress bar?

any coming solution appreciated.

in case, don't want area inside items filled percentually, recommend creating ten empty divs side side, , add classes fill them color items filled.

just click run code snippet below , see mean.

.container {      width: 100%;  }    .item {      width: 10%;      border: 1px solid grey;      background-color: lightgray;      border-radius: 3px;      margin-right: 2px;      float: left;      display: block;      height: 20px;  }    .filled {      background-color: blue !important;  }
<div class="container">      <div class="item filled"></div>      <div class="item filled"></div>      <div class="item"></div>      <div class="item"></div>      <div class="item"></div>      <div class="item"></div>      <div class="item"></div>      <div class="item"></div>      <div class="item"></div>  </div>

use bootstrap component if need fill divs in percentual parts. styles, can import styles bootstrap.

but, if want hard use bootstrap component, have ugly workaround here.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -