1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>CSS Test: allowed page breaks between table rows</title>
5 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
6 <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-break-props">
7 <link rel="help" href="http://www.w3.org/TR/css3-page/#allowed-pg-brk">
8 <meta name="assert" content="Unforced breaking in the vertical margin between sibling table rows is allowed only if the 'page-break-after' and 'page-break-before' properties of all the elements generating boxes that meet at this margin are 'auto' and the common ancestors of all the elements do not have a 'page-break-inside' value of 'avoid'.">
9 <meta name="flags" content="may paged">
10 <style type="text/css">
11 html, body { height: 100%; line-height: 1; font-size: 20px; margin: 0; padding: 0; }
12 .spacer { height: 50%; }
13 .backup { margin-top: -1em; }
14 .start { page-break-before: always; }
15
16 .avoidBefore { page-break-before: avoid; }
17 .avoidAfter { page-break-after: avoid; }
18 .avoidInside { page-break-inside: avoid; }
19 .allowInside { page-break-inside: auto; }
20
21 table, tbody, tr, td {
22 border-collapse: collapse;
23 margin: 0; padding: 0;
24 border-spacing: 0;
25 color: blue;
26 }
27 table, tbody { page-break-inside: avoid; /* override any UA settings */ }
28 </style>
29 </head>
30 <body>
31 <div class="spacer">
32 Lines A-N must appear on the 10 pages of this test. The blue text
33 must accurately describe the page numbers.
34 </div><div class="spacer backup"></div>
35 <table><tbody class="avoidInside">
36 <tr><td>Page 2 Line A</td></tr>
37 <tr><td>Page 2 Line B</td></tr>
38 </tbody></table>
39
40 <div class="spacer start">
41 <tr><td>Page 3 Line C</td></tr>
42 </div><div class="spacer backup"></div>
43 <div class="avoidInside"><div><div><div><div><table><tbody class="allowInside">
44 <tr><td>Page 4 Line D</td></tr>
45 <tr><td>Page 4 Line E</td></tr>
46 </tbody></table></div></div></div></div></div>
47
48 <div class="spacer start">
49 <tr><td>Page 5 Line F</td></tr>
50 </div><div class="spacer backup"></div>
51 <table><tbody class="allowInside">
52 <tr><td>Page 5 Line G</td></tr>
53 <tr><td>Page 6 Line H</td></tr>
54 </tbody></table>
55
56 <div class="spacer start">
57 <tr><td>Page 7 Line I</td></tr>
58 </div><div class="spacer backup"></div>
59 <table><tbody>
60 <tr class="avoidAfter"><td>Page 8 Line J</td></tr>
61 <tr><td>Page 8 Line K</td></tr>
62 </tbody></table>
63
64 <div class="spacer start">
65 <tr><td>Page 9 Line L</td></tr>
66 </div><div class="spacer backup"></div>
67 <table><tbody>
68 <tr><td>Page 10 Line M</td></tr>
69 <tr class="avoidBefore"><td>Page 10 Line N</td></tr>
70 </tbody></table>
71 </body>
72 </html>