|
Posted by David Dorward on 06/11/07 14:14
On Jun 11, 2:58 pm, kaczm...@gmail.com wrote:
> 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.
Oh boy. HTML isn't designed for drawing diagrams with. For this sort
of thing I'd look to images (or maybe Flash).
> 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;" />
That looks like XHTML which doesn't conform to Appendix C. If you're
serving it as text/html then anything can happen and you really should
stop. If you're serving it as XHTML, then IE should be prompting you
to download it.
So I'm guessing you're doing the former. Write HTML instead, or at
least follow the HTML compatibility guidelines.
Also, as always, a real URL is better then tiny fragments of a
document. So much depends on context, that document fragments are all
but worthless for debugging code.
--
David Dorward
http://dorward.me.uk/
[Back to original message]
|