You are here: Re: div with background color not rendering in Firefox, but renders in IE. « HTML « IT news, forums, messages
Re: div with background color not rendering in Firefox, but renders in IE.

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/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация