"Christophe MERESSE" <> wrote:
>I encountered a problem with a table in Firefox:
>
><table border="1">
><tr><td>Col1</td><td>Col2</td></tr>
><tr style="display:block"><td colspan="2">This cell should take 2 columns
>but does not because of the display:block</td></tr>
></table>
So the second <tr> is no longer a table row, but is instead a block.
So why should the <td>s within it be treated as if they were still
within a table row?
This is what I think is happening: the <tr> is now a block (i.e. it
might as well be a <div> as far as formatting goes), but is within the
<table>. The only way this can work is if the block <tr> is within one
of the cells of the table. Obviously not one of the cells defined by a
<td> but an anonymous cell created in the first column of an anonymous
row. If the <tr> is within the first column then the <td> within that
can't possibly span over into the second column.
>This problem has been raised by John Dalberg at the begining of
>november (I found it with google groups) and he has been sadely shot down in
>flames.
>but I was in the same situation and I really think that it is a firefox bug.
Opera agrees with FF. As IE has only basic support for the CSS display
property, the chances are that IE is wrong and FF and Opera are right.
>If you replace display:block by display:anything it works fine both in IE
>and firefox so that my problem
Well display: anything is undefined in the spec so the default value
for <tr>, i.e. display: table-row (which IE doesn't support), should
be used instead.
>is solved but I really wonder what the "block" word does wrong in Firefox...
It turns the <tr> into a block instead of a table-row. What else could
it do?
Steve
|