FireFox bug?

M

Michele Locati

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...)?
 
M

Martin Honnen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top