Previous Message
Next Message

Re: [css-d] CSS bar chart

Sent by annelise on 6 January 2003 08:08


On Sun, 5 Jan 2003, M. A. Sridhar wrote:
>
> I have been playing with using CSS for generating a simple bar chart. I have
> appended an HTML file illustrating the idea. The problem is that IE renders
> the chart as expected, but Mozilla 1.2 renders all bars with the same height.
> I can't explain this difference, and would greatly appreciate your inputs on
> this.
>
>       <td align="center" class="barCell">
>         <div class="blueBar" style="height: 100">&nbsp;</div>
>         <div class="redBar" style="height: 120">&nbsp;</div>
>       </td>
>       <td align="center" class="barCell">
>         <div class="blueBar" style="height: 170">&nbsp;</div>
>         <div class="redBar" style="height: 130">&nbsp;</div>
>       </td>
>       <td align="center" class="barCell">
>         <div class="blueBar" style="height: 80">&nbsp;</div>
>         <div class="redBar" style="height: 140">&nbsp;</div>
>       </td>


You need units on the heights. IE is guessing you mean pixels, Mozilla's
not wanting to guess.

change to "height:100px;"  etc

Annelise
Previous Message
Next Message

Message thread: