I am trying to create some CSS that will allow me to make my own progress bar.
The HTML5 feature <progress value="10" max="100"></progress> would work, but I want to do this myself.
My CSS defines the .progressbar to be 10px wide and 10px high (I should really rename that to .progressPiece, but that can come later).
.progressbar>div {
margin:0;
padding:0;
height:10px;
width:10px;
}
For each section of my completed progressbar, I have created a class that defines what image to use:
.start>div {
background: url("/images/images/pbStart.gif") right center no-repeat;
}
.startGlow>div {
background: url("/images/images/pbStartGlow.gif") right center no-repeat;
}
.chunk>div {
background: url("/images/images/pbChunk.gif") right center no-repeat;
}
.motion>div {
background: url("/images/images/pbMotion.gif") right center no-repeat;
}
.end>div {
background: url("/images/images/pbEnd.gif") right center no-repeat;
}
.endGlow>div {
background: url("/images/images/pbEndGlow.gif") right center no-repeat;
}
From looking at examples, I would think the following code segments would work:
<div class="progressbar startGlow"></div>
<div class="progressbar chunk"></div>
<div class="progressbar chunk"></div>
<div class="progressbar chunk"></div>
<div class="progressbar end"></div>





<div class="progressbar start"></div>
<div class="progressbar motion"></div>
<div class="progressbar chunk"></div>
<div class="progressbar chunk"></div>
<div class="progressbar end"></div>





<div class="progressbar start"></div>
<div class="progressbar chunk"></div>
<div class="progressbar motion"></div>
<div class="progressbar chunk"></div>
<div class="progressbar end"></div>





<div class="progressbar start"></div>
<div class="progressbar chunk"></div>
<div class="progressbar chunk"></div>
<div class="progressbar motion"></div>
<div class="progressbar end"></div>





<div class="progressbar start"></div>
<div class="progressbar chunk"></div>
<div class="progressbar chunk"></div>
<div class="progressbar chunk"></div>
<div class="progressbar endGlow"></div>





Obviously, my text is not producing the output I want.
All I see are non-existent boxes, as shown in this jsFiddle.
Why doesn't this work?
UPDATE: Though this is now solved, I am using this workspace to develop this same progress bar using smaller jpeg images.
























