allowed-page-breaks-005.xht (1429B)
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 Blocks</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 block boxes."/> 10 <style type="text/css"> 11 /* Most permissible breaking possible */ 12 * { widows: 1; orphans: 1; widows: 0; orphans: 0; } 13 14 /* Leave 4em 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: -4em; 25 } 26 27 /* Test CSS */ 28 .first, .second { /* Each border box is 1.5em; margin box is 2.5em. */ 29 white-space: nowrap; 30 border: 0.25em solid blue; 31 margin: 0.5em; 32 /* Make test text more visible */ 33 color: blue; 34 font-weight: bold; 35 } 36 </style> 37 </head> 38 <body> 39 <div class="spacer1">This test requires 2 pages. Box A must appear on the first page and Box B on the second.</div> 40 <div class="spacer2"></div> 41 <div class="first">Page 1 Box A</div> 42 <div class="second">Page 2 Box B</div> 43 </body> 44 </html>