I’ve got to implement a quick n dirty stacked bar chart with just DIVs and SPANs, at the moment the idea I have in my head goes something like this:
<div style='width:500px'>
<span class='d5' style='width:33%;'>5</span>
<span class='d4' style='width:27%;'>4</span>
<span class='d3' style='width:20%;'>3</span>
<span class='d2' style='width:13%;'>2</span>
<span class='d1' style='width:6%;'>1</span>
</div>
However, this isn’t working. Can someone put me right? I think I need to use position: absolute/relative and/or float here but everything is having little effect.
I would use divs instead of the spans and also give your divs height otherwise they will not be displayed. If you want div’s to be lined horizontally then set the float:left;