- From: Ian Hickson <py8ieh@bath.ac.uk>
- Date: Tue, 15 Jun 1999 14:50:33 +0100 (BST)
- To: "L. David Baron" <dbaron@fas.harvard.edu>
- cc: www-style@w3.org
On Tue, 15 Jun 1999, L. David Baron wrote: > Actually the adjacent table-cell elements should end up in the same > row in either case. If you want each link in its own row, you would > need display: table-row on the link elements. See [1]. (But how do > these rules interact with display: none on siblings between > table-cells??) They don't. Setting display:none completely removes an element from the flow. This is analogous to the follow scenario: <style> block { display: none; } inline { display: inline; } </style> <!-- ... --> <inline> Hello </inline> <block> Lovely </block> <inline> World </inline> ...which would render as: Hello World (...and not with the Hello and World on different lines.) Similarly, a float or absolutely positioned element is removed from flow, so a run-in followed by a a float followed by a block will run-in to the block (the float is totally ignored by the run-in). Thus, in a table with an absolutely positioned or display:none cell, the remaining cells move to fill the gap. Hence: <table> <tr> <td> 1 </td> <td> 2 </td> <td> 3 </td> </tr> <tr> <td style="display:none"> 4 </td> <td> 5 </td> <td> 6 </td> </tr> <tr> <td> 7 </td> <td> 8 </td> <td> 9 </td> </tr> </table> ...would render as +---+ +---+ +---+ | 1 | | 2 | | 3 | +---+ +---+ +---+ +---+ +---+ | 5 | | 6 | +---+ +---+ +---+ +---+ +---+ | 7 | | 8 | | 9 | +---+ +---+ +---+ So in the HEAD, you can safely ignore all the display:none elements. -- Ian Hickson : Is your JavaScript ready for Nav5 and IE5? : Get the latest JavaScript client sniffer at : http://developer.netscape.com/docs/examples/javascript/browser_type.html
Received on Tuesday, 15 June 1999 09:50:39 UTC