| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <title>CSS Test: allowed page breaks between blocks within table cells</title> |
| <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/> |
| <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-break-props"/> |
| <link rel="help" href="http://www.w3.org/TR/css3-page/#allowed-pg-brk"/> |
| <meta name="assert" content="Unforced breaking in the vertical margin between |
| sibling block boxes 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'."/> |
| <meta name="flags" content="may paged" /> |
| <style type="text/css"> |
| html, body { height: 100%; line-height: 1; font-size: 20px; margin: 0; padding: 0; } |
| .spacer { height: 50%; } |
| .backup { margin-top: -1em; } |
| .start { page-break-before: always; } |
| |
| p { |
| margin: 0; |
| color: blue; |
| } |
| |
| .avoidBefore { page-break-before: avoid; } |
| .avoidAfter { page-break-after: avoid; } |
| .avoidInside { page-break-inside: avoid; } |
| .allowInside { page-break-inside: auto; } |
| |
| |
| table, tbody, tr, td { |
| border-collapse: collapse; |
| margin: 0; padding: 0; |
| border-spacing: 0; |
| color: blue; |
| } |
| </style> |
| </head> |
| <body> |
| <div class="spacer"> |
| Lines A-T must appear on the 18 pages of this test. The blue text |
| must accurately describe the page numbers. |
| </div><div class="spacer backup"></div> |
| <table><tbody><tr class="avoidInside"> |
| <p>Page 2 Line A</p> |
| <p>Page 2 Line B</p> |
| </tr></tbody></table> |
| |
| <div class="spacer start"> |
| <p>Page 3 Line C</p> |
| </div><div class="spacer backup"></div> |
| <div class="avoidInside"><div><div><div><table><tbody><tr><td class="allowInside"> |
| <p>Page 4 Line D</p> |
| <p>Page 4 Line E</p> |
| </td></tr></tbody></table></div></div></div></div> |
| |
| <div class="spacer start"> |
| <p>Page 5 Line F</p> |
| </div><div class="spacer backup"></div> |
| <table><tbody><tr><td class="allowInside"> |
| <p>Page 5 Line G</p> |
| <p>Page 6 Line H</p> |
| </td></tr></tbody></table> |
| |
| <div class="spacer start"> |
| <p>Page 7 Line I</p> |
| </div><div class="spacer backup"></div> |
| <table><tbody><tr><td> |
| <p class="avoidAfter">Page 8 Line J</p> |
| <p>Page 8 Line K</p> |
| </td></tr></tbody></table> |
| |
| <div class="spacer start"> |
| <p>Page 9 Line L</p> |
| </div><div class="spacer backup"></div> |
| <table><tbody><tr><td> |
| <p>Page 10 Line M</p> |
| <p class="avoidBefore">Page 10 Line N</p> |
| </td></tr></tbody></table> |
| |
| <div class="spacer start"> |
| <p>Page 11 Line O</p> |
| </div><div class="spacer backup"></div> |
| <table><tbody><tr><td> |
| <div class="avoidAfter"><div> |
| <p>Page 12 Line P</p> |
| </div></div> |
| <p>Page 12 Line Q</p> |
| </td></tr></tbody></table> |
| |
| <div class="spacer start"> |
| <p>Page 13 Line R</p> |
| </div><div class="spacer backup"></div> |
| <table><tbody><tr><td> |
| <p>Page 14 Line S</p> |
| <div class="avoidBefore"><div> |
| <p>Page 14 Line T</p> |
| </div></div> |
| </td></tr></tbody></table> |
| |
| <div class="spacer start"> |
| <p>Page 15 Line O</p> |
| </div><div class="spacer backup"></div> |
| <table><tbody><tr><td> |
| <div><div> |
| <p class="avoidAfter">Page 16 Line P</p> |
| </div></div> |
| <p>Page 16 Line Q</p> |
| </td></tr></tbody></table> |
| |
| <div class="spacer start"> |
| <p>Page 17 Line R</p> |
| </div><div class="spacer backup"></div> |
| <table><tbody><tr><td> |
| <p>Page 18 Line S</p> |
| <div><div> |
| <p class="avoidBefore">Page 18 Line T</p> |
| </div></div> |
| </td></tr></tbody></table> |
| </body> |
| </html> |