allowed-page-breaks-006.xht (1339B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <title>CSS Test: Allowed Page Breaks - Between Line Boxes</title> 6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#spacing-props"/> 8 <meta name="flags" content="paged"/> 9 <meta name="assert" content="Page breaks can occur between line boxes."/> 10 <style type="text/css"> 11 /* Most permissible breaking possible */ 12 * { widows: 1; orphans: 1; widows: 0; orphans: 0; } 13 14 /* Leave 2.5 lines at bottom to play with, independent of page size. */ 15 html, body { 16 height: 100%; 17 line-height: 1; 18 } 19 .spacer1 { 20 height: 70%; 21 } 22 .spacer2 { 23 height: 30%; 24 margin-top: -2.5em; 25 } 26 27 .test { 28 white-space: pre; 29 /* Make test text more visible */ 30 color: blue; 31 font-weight: bold; 32 } 33 </style> 34 </head> 35 <body> 36 <div class="spacer1">This test requires 2 pages. Lines A and B must appear 37 on the first page, lines C and D on the second.</div> 38 <div class="spacer2"></div> 39 <div class="test"> Page 1 Line A 40 Page 1 Line B 41 Page 2 Line C 42 Page 2 Line D 43 </div> 44 </body> 45 </html>