![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The W3C added THEAD, TFOOT and TBODY elements to facilitate the printing of long tables, so that header and footer information could be repeated on each page. While I have seen this discussed briefly in a number of text books, I have never seen it applied in reality satisfactorily. Can anyone point me to a real situation where this has been done please? I have tried in vain to find examples, but have been deluged with irrelevant information so that I can't see the wood for the trees! Does anyone know of limitations? Very many thanks. |
#3
| |||
| |||
|
|
On 12/26/2007 9:48 AM, johnacooke (AT) gmail (DOT) com wrote: The W3C added THEAD, TFOOT and TBODY elements to facilitate the printing of long tables, so that header and footer information could be repeated on each page. While I have seen this discussed briefly in a number of text books, I have never seen it applied in reality satisfactorily. Can anyone point me to a real situation where this has been done please? I have tried in vain to find examples, but have been deluged with irrelevant information so that I can't see the wood for the trees! Does anyone know of limitations? Very many thanks. In Gecko browsers (e.g., Firefox, SeaMonkey, Camino), there is a well-known bug that prevents proper printing of long tables. See https://bugzilla.mozilla.org/show_bug.cgi?id=294991>. Despite the Summary, this also appears to affect tables without captions. |
#4
| |||
| |||
|
|
David E. Ross wrote: [...] In Gecko browsers (e.g., Firefox, SeaMonkey, Camino), there is a well-known bug that prevents proper printing of long tables. See https://bugzilla.mozilla.org/show_bug.cgi?id=294991>. Despite the Summary, this also appears to affect tables without captions. I was surprised by this item dated 2005-06-19: The problem seems to be that we reflow the inner table, *then* we reflow and place the caption, which moves the inner table down. The inner table no longer fits on the page so bad things happen. It looks like we want to reflow the table first to find the table width before we reflow the caption, but we need to reflow the caption first so we know the available height ... I'm not sure how to resolve this circularity. Any ideas I don't see any circularity. Once computed, the table width should remain the same and apply to every part of the table no matter how many pages it covers. After that, the height of the caption can be determined, and now the only thing that that affects is the choice of a subset of rows to print on each page. Am I missing one or more considerations? |
#5
| |||
| |||
|
|
It may be that the Gecko code only computes the width of a table as a side-effect of reflowing it, so it's a hassle to re-organize, but there is no real circularity that I can see: the width of the table doesn't depend on the height of the caption. |
#6
| |||
| |||
|
|
David E. Ross wrote: On 12/26/2007 9:48 AM, johnacooke (AT) gmail (DOT) com wrote: The W3C added THEAD, TFOOT and TBODY elements to facilitate the printing of long tables, so that header and footer information could be repeated on each page. While I have seen this discussed briefly in a number of text books, I have never seen it applied in reality satisfactorily. Can anyone point me to a real situation where this has been done please? I have tried in vain to find examples, but have been deluged with irrelevant information so that I can't see the wood for the trees! Does anyone know of limitations? Very many thanks. In Gecko browsers (e.g., Firefox, SeaMonkey, Camino), there is a well-known bug that prevents proper printing of long tables. See https://bugzilla.mozilla.org/show_bug.cgi?id=294991>. Despite the Summary, this also appears to affect tables without captions. I was surprised by this item dated 2005-06-19: The problem seems to be that we reflow the inner table, *then* we reflow and place the caption, which moves the inner table down. The inner table no longer fits on the page so bad things happen. It looks like we want to reflow the table first to find the table width before we reflow the caption, but we need to reflow the caption first so we know the available height ... I'm not sure how to resolve this circularity. Any ideas I don't see any circularity. Once computed, the table width should remain the same and apply to every part of the table no matter how many pages it covers. After that, the height of the caption can be determined, and now the only thing that that affects is the choice of a subset of rows to print on each page. Am I missing one or more considerations? |
#7
| |||
| |||
|
|
Harlan Messinger wrote: David E. Ross wrote: [...] In Gecko browsers (e.g., Firefox, SeaMonkey, Camino), there is a well-known bug that prevents proper printing of long tables. See https://bugzilla.mozilla.org/show_bug.cgi?id=294991>. Despite the Summary, this also appears to affect tables without captions. I was surprised by this item dated 2005-06-19: The problem seems to be that we reflow the inner table, *then* we reflow and place the caption, which moves the inner table down. The inner table no longer fits on the page so bad things happen. It looks like we want to reflow the table first to find the table width before we reflow the caption, but we need to reflow the caption first so we know the available height ... I'm not sure how to resolve this circularity. Any ideas I don't see any circularity. Once computed, the table width should remain the same and apply to every part of the table no matter how many pages it covers. After that, the height of the caption can be determined, and now the only thing that that affects is the choice of a subset of rows to print on each page. Am I missing one or more considerations? If there are any floats beside the table, I can see how the *height* of the rows might need to be recomputed as some of the ones whose text would have wrapped at the floated element will have been pushed down beneath it. |
#8
| |||
| |||
|
|
Ben C wrote: What I think you're describing can't happen. You can't have text inside a table cell flowing around a float that originates outside the table cell (including outside the table). This is because table cells are "block formatting contexts"-- which means floats never leak into or out of them. I'm not sure how that follows. A div is a block formatting context, and the text within a div will certainly flow around a floated element that precedes the div. |
|
I just ran a test with a p styled float: right and width: 10em followed by a table styled width: 100% and three rows containing five columns of text each, and found that that IE6 puts the whole table underneath the paragraph and then gives it the width of the browser, while Firefox 2 ignores the paragraph completely when positioning and layout the the table, also giving the table the full width of the browser, but also overlapping the paragraph in full. My FTP server is refusing my connection right now so I can't upload my test file for inspection but it's below for anyone who wants to look. |
#9
| |||
| |||
|
|
Ben C wrote: On 2007-12-27, Harlan Messinger <hmessinger.removethis (AT) comcast (DOT) net> wrote: [...] If there are any floats beside the table, I can see how the *height* of the rows might need to be recomputed as some of the ones whose text would have wrapped at the floated element will have been pushed down beneath it. What I think you're describing can't happen. You can't have text inside a table cell flowing around a float that originates outside the table cell (including outside the table). This is because table cells are "block formatting contexts"-- which means floats never leak into or out of them. I'm not sure how that follows. A div is a block formatting context, |
|
and the text within a div will certainly flow around a floated element that precedes the div. |
|
I just ran a test with a p styled float: right and width: 10em followed by a table styled width: 100% and three rows containing five columns of text each, and found that that IE6 puts the whole table underneath the paragraph and then gives it the width of the browser, while Firefox 2 ignores the paragraph completely when positioning and layout the the table, also giving the table the full width of the browser, but also overlapping the paragraph in full. My FTP server is refusing my connection right now so I can't upload my test file for inspection but it's below for anyone who wants to look. |
#10
| |||
| |||
|
|
Harlan Messinger wrote: Ben C wrote: What I think you're describing can't happen. You can't have text inside a table cell flowing around a float that originates outside the table cell (including outside the table). This is because table cells are "block formatting contexts"-- which means floats never leak into or out of them. I'm not sure how that follows. A div is a block formatting context, and the text within a div will certainly flow around a floated element that precedes the div. OK, I'd been looking at the section block formatting contexts. I just looked at the section on floats and found the relevant explanation: "The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself. If necessary, implementations should clear the said element by placing it below any preceding floats, but may place it adjacent to such floats if there is sufficient space. They may even make the border box of said element narrower than defined by section 10.3.3. CSS2 does not define when a UA may put said element next to the float or by how much said element may become narrower." [...] It appears for once that it's IE6 that exhibits an acceptable behavior while Firefox 2 doesn't. |

![]() |
| Thread Tools | |
| Display Modes | |
| |