allowed-page-breaks-001c.xht (3996B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: allowed page breaks between blocks within table cells</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 9 sibling block boxes is allowed only if the 'page-break-after' and 10 'page-break-before' properties of all the elements generating boxes 11 that meet at this margin are 'auto' and the common ancestors of all 12 the elements do not have a 'page-break-inside' value of 'avoid'."/> 13 <meta name="flags" content="may paged" /> 14 <style type="text/css"> 15 html, body { height: 100%; line-height: 1; font-size: 20px; margin: 0; padding: 0; } 16 .spacer { height: 50%; } 17 .backup { margin-top: -1em; } 18 .start { page-break-before: always; } 19 20 p { 21 margin: 0; 22 color: blue; 23 } 24 25 .avoidBefore { page-break-before: avoid; } 26 .avoidAfter { page-break-after: avoid; } 27 .avoidInside { page-break-inside: avoid; } 28 .allowInside { page-break-inside: auto; } 29 30 31 table, tbody, tr, td { 32 border-collapse: collapse; 33 margin: 0; padding: 0; 34 border-spacing: 0; 35 color: blue; 36 } 37 </style> 38 </head> 39 <body> 40 <div class="spacer"> 41 Lines A-T must appear on the 18 pages of this test. The blue text 42 must accurately describe the page numbers. 43 </div><div class="spacer backup"></div> 44 <table><tbody><tr class="avoidInside"> 45 <p>Page 2 Line A</p> 46 <p>Page 2 Line B</p> 47 </tr></tbody></table> 48 49 <div class="spacer start"> 50 <p>Page 3 Line C</p> 51 </div><div class="spacer backup"></div> 52 <div class="avoidInside"><div><div><div><table><tbody><tr><td class="allowInside"> 53 <p>Page 4 Line D</p> 54 <p>Page 4 Line E</p> 55 </td></tr></tbody></table></div></div></div></div> 56 57 <div class="spacer start"> 58 <p>Page 5 Line F</p> 59 </div><div class="spacer backup"></div> 60 <table><tbody><tr><td class="allowInside"> 61 <p>Page 5 Line G</p> 62 <p>Page 6 Line H</p> 63 </td></tr></tbody></table> 64 65 <div class="spacer start"> 66 <p>Page 7 Line I</p> 67 </div><div class="spacer backup"></div> 68 <table><tbody><tr><td> 69 <p class="avoidAfter">Page 8 Line J</p> 70 <p>Page 8 Line K</p> 71 </td></tr></tbody></table> 72 73 <div class="spacer start"> 74 <p>Page 9 Line L</p> 75 </div><div class="spacer backup"></div> 76 <table><tbody><tr><td> 77 <p>Page 10 Line M</p> 78 <p class="avoidBefore">Page 10 Line N</p> 79 </td></tr></tbody></table> 80 81 <div class="spacer start"> 82 <p>Page 11 Line O</p> 83 </div><div class="spacer backup"></div> 84 <table><tbody><tr><td> 85 <div class="avoidAfter"><div> 86 <p>Page 12 Line P</p> 87 </div></div> 88 <p>Page 12 Line Q</p> 89 </td></tr></tbody></table> 90 91 <div class="spacer start"> 92 <p>Page 13 Line R</p> 93 </div><div class="spacer backup"></div> 94 <table><tbody><tr><td> 95 <p>Page 14 Line S</p> 96 <div class="avoidBefore"><div> 97 <p>Page 14 Line T</p> 98 </div></div> 99 </td></tr></tbody></table> 100 101 <div class="spacer start"> 102 <p>Page 15 Line O</p> 103 </div><div class="spacer backup"></div> 104 <table><tbody><tr><td> 105 <div><div> 106 <p class="avoidAfter">Page 16 Line P</p> 107 </div></div> 108 <p>Page 16 Line Q</p> 109 </td></tr></tbody></table> 110 111 <div class="spacer start"> 112 <p>Page 17 Line R</p> 113 </div><div class="spacer backup"></div> 114 <table><tbody><tr><td> 115 <p>Page 18 Line S</p> 116 <div><div> 117 <p class="avoidBefore">Page 18 Line T</p> 118 </div></div> 119 </td></tr></tbody></table> 120 </body> 121 </html>