![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hello, ive been trying to figure something out, largely thru trial & error. thought perhaps someone else may have knowledge. i have an html table that consists of blocks of related data -- each block contains three rows. this table is destined for paper printing. i would like to tell the browser *not* to bust up my blocks. rather, i would like it to smartly insert a page break inbetween <tbody>s if the last one cannot be rendered entirely onto the remaining page area. i have tried to accomplish this by styling the <tbody> w/ "page-break-before:auto;" -- hoping that it would automatically insert a break before any <tbody> that cant fit on the page. sadly, this doesnt work. im not sure what IE uses for its "auto" criteria, but it doesnt appear to be "Does this element fit onto this page?" ive also tried "page-break-after:auto", and both. no dice. does any one have any other ideas? thanks! and heres the html: table thead tr th>header 1</th th>header 2</th /tr thead tfoot tr td>footer 1</td td>footer 2</td /tr tfoot !-- dont break this block -- tbody tr td>block 1, row 1</td td>block 1, row 2</td /tr tbody !-- dont break this block -- tbody tr td>block 2, row 1</td td>block 2, row 2</td /tr tbody !-- dont break this block -- tbody tr td>block 3, row 1</td td>block 3, row 2</td /tr tbody /table |
#3
| |||
| |||
|
|
Hard to say, if you used that markup is is so invalid...where to start. Show a URL maybe your example here has typos (hopefully) |
#4
| |||
| |||
|
|
What happens if you combine the three rows into *one* <tbody> ? !-- dont break this block -- tbody tr td>block 1, row 1</td> <-- these would be *cell* 1 td>block 1, row 2</td> <-- *cell* 2 ... /tr tr td>block 2, row 1</td td>block 2, row 2</td /tr tr td>block 3, row 1</td td>block 3, row 2</td /tr tbody |
#5
| |||
| |||
|
|
Beauregard T. Shagnasty wrote: What happens if you combine the three rows into *one* <tbody> ? !-- dont break this block -- tbody tr td>block 1, row 1</td> <-- these would be *cell* 1 td>block 1, row 2</td> <-- *cell* 2 ... /tr tr td>block 2, row 1</td td>block 2, row 2</td /tr tr td>block 3, row 1</td td>block 3, row 2</td /tr tbody that wouldnt achieve anything. the <TBODY> tagset can be used in my op's fashion (multiple instances) as a means of organizing sets of rows into blocks (presumably of related data). my intent is to then style those blocks such that they dont split apart onto multiple pages. if i kept *all* the <TR> rows under the same <TBODY> roof, i have no smaller units, only the single tbody. that especially wont do, since i have 300 rows in total (3 in each <TBODY> -- far more than can fit onto one page. |
#6
| |||
| |||
|
|
Waiddaminnit. You said you had data in blocks of three rows. Yet you illustrated three _single_rows_, each in a separate <tbody>. |
#7
| |||
| |||
|
|
In alt.html, matt (AT) mailinator (DOT) com wrote: Beauregard T. Shagnasty wrote: Waiddaminnit. You said you had data in blocks of three rows. Yet you illustrated three _single_rows_, each in a separate <tbody>. so i did. glaring omission; i was pretty burnt out working on it last nite. updated HTML, but the problem is still the same as described -- IE 6 (win) inserts breaks directly into the <TBODY>s, even while using the previously mentioned page-break instructions. this is confusing to me. im not sure if IE is failing to "avoid" doing page breaks on my TBODY>s because A) its not supported, or B) because my attempts havent been correct. (i dont have the HTML typos in my actual markup. they are more complex tables which i reduced to simpler examples in google's textbox for posting [no newsgroups fun at my org], probably in too much of a hurry). Tell us if this page I tossed together from your code - adding some text to make it a meaningful length - is what you are attempting. http://k75s.home.att.net/tbody.html This works (page-break-after tbody) in Firefox, but not in IE or Opera. The issue is with IE, so folks wonder why web developers b*tch about IE? |
#8
| |||
| |||
|
|
Tell us if this page I tossed together from your code - adding some text to make it a meaningful length - is what you are attempting. |
#9
| |||
| |||
|
|
The issue is with IE, so folks wonder why web developers b*tch about IE? |

#10
| |||
| |||
|
|
here is a modified version of your page. note that there are 3 <TBODY blocks. note that in firefox only 2 <TBODY>s can fit onto a single page (in IE, only 1 can). note then how both browsers then split the non-fitting <TBODY>, rather than inserting a new page as desired/instructed....: http://www.sushi-review.com/test/tbody2.html |
![]() |
| Thread Tools | |
| Display Modes | |
| |