Guy 0

I'm trying to create a horizontal bar chart by setting the width of a div inside a td and then changing the background color of it.

Initially I was trying to create a table with td's in the second column being of different widths but that is not possible right?

So my next step was to use the td's in the second column as the base and maximum width of a bar and then have a div which was the width of the bar and color that differently.

I'm really struggling to get this to work. Is this a known technique to fudge horizontal bar charts? Is there a better way to do this?

2 answers


don't use tables for layout

Answered almost 7 years ago by Jacob R