|
Posted by kaczmar2 on 06/11/07 16:26
Thank you all for your suggestions...
adding the "height" attribute to the style of the div did work and
allowed the div to display in both IE and FF.
I can understand the suggestion of not using HTML for charting. I can
create a 1 pixel wide image of a specific height and any desired with,
and render it out that was as well.
Thanks again.
On Jun 11, 9:58 am, kaczm...@gmail.com wrote:
> Hello,
>
> I am trying to make a simple bar chart for a web page. For this, I
> need to calculate the widths of divs in pixels, and then display
> them. They have no text content; I just need them to show up and
> colored bars. The code is like this:
>
> <div style="background-color:#000000; width: 50px;" />
> ...
> <div style="background-color:#000000; width: 75px;" />
>
> This shows up no problem in IE6+, but not in Firefox 2.
>
> If I put text content in the div, it displays, but it sizes to just
> fit the content. (This follows from the CSS documentation of
> "display:inline";) but I need to show the absolute size in pixels
>
> Any clues as to how to get the div to show up with the background
> color?
>
> Thanks.
[Back to original message]
|