469,290 Members | 1,824 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

FireFox bug?

Hi!

I've the FireFox v1.5.0.2 (latest italian version), but it has a
strange behaviour with the following code (in IE it works as expected):

<HTML>
<HEAD>
<STYLE>
#hTable
{
width:100%;
display:none;
}
#hTable TD
{
width:50%;
}
</STYLE>
<SCRIPT language="javascript">
function init()
{
var jTable=document.getElementById("hTable");
jTable.style.display="block";
/*
"inline" doesn't work too, and the table anc cells borders
are broken
*/
}
</SCRIPT>
</HEAD>
<BODY onLoad="init()">
<TABLE border="1" id="hTable"><TR>
<TD>ciao</TD>
<TD>hello</TD>
</TR></TABLE>
</BODY>
</HTML>

Does anyone already noticed this problem (it seems to me it's a bug in
FireFox...)?

Apr 20 '06 #1
1 1152


Michele Locati wrote:

#hTable
{
width:100%;
display:none;
} var jTable=document.getElementById("hTable");
jTable.style.display="block";


Check the CSS 2.1 specification, the value it defines for display if you
want table rendering is "table" and not "block" so if you want to have a
table rendered as a table you need
jTable.style.display = "table";
for Mozilla and other browsers implementing CSS 2.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Apr 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.