I can't track down any of my old code right now, but here's the basics,
step 1 - have your php page create the div which will be the bar and the size of the bar is the width field
each bar gets it's own div, the output html looks like this
-
<div class="bar" style=" width: width-variable ">your bar variable</div>
-
then your css sets the rest of the style for the div
-
.bar {
-
height: 14px;
-
border: solid black 1px;
-
background-color: blue;
-
}
-
that's it! You can line-up your bars by setting absolute positions if necessary, etc.
Vertical bars are a bit more difficult, but can be done (I did it a LONG time ago and remember positioning it being a pain, but eventually got it working).
If memory serves me correctly, the vertical bars where made by creating a div with a set width, and then having the background image begin partway the div setting the background position in the output.
Hope it helps,
Pete