FireFox bug?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michele Locati

    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="javas cript">
    function init()
    {
    var jTable=document .getElementById ("hTable");
    jTable.style.di splay="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...)?

  • Martin Honnen

    #2
    Re: FireFox bug?



    Michele Locati wrote:

    [color=blue]
    > #hTable
    > {
    > width:100%;
    > display:none;
    > }[/color]
    [color=blue]
    > var jTable=document .getElementById ("hTable");
    > jTable.style.di splay="block";[/color]

    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.di splay = "table";
    for Mozilla and other browsers implementing CSS 2.




    --

    Martin Honnen

    Comment

    Working...