471,896 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,896 software developers and data experts.

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 1171


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 Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.