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 break - line box breaking</title>
5 <link rel="author" title="Tom Clancy" href="mailto:tclancy@revenution.com">
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/page.html#page-break-props">
8 <meta name="assert" content="Breaking between line boxes is allowed only if the number of line boxes between the break and the start of the enclosing block box is the value of 'orphans' or more, and the number of line boxes between the break and the end of the box is the value of 'widows' or more and the value of the 'page-break-inside' property is 'auto'.">
9 <meta name="flags" content="paged">
10 <style type="text/css">
11 html, body { height: 100%; line-height: 1; font-size: 20px; margin: 0; padding: 0; }
12
13 * {page-break-inside: auto;}
14 div.spacer {
15 height: 50%;
16 }
17 div.backup {
18 margin-top: -3em;
19 }
20 div.dummy {
21 width: 0;
22 page-break-after: always;
23 color: blue;
24 }
25
26 div {
27 widows: 1;
28 orphans: 1;
29 }
30 div#second {orphans: 4;}
31 div#third {widows: 4;}
32 div#fourth {page-break-inside: avoid; page-break-after: auto; }
33 </style>
34 </head>
35 <body>
36 <div class="spacer">This test requires 8 pages. The blue text must
37 denote accurate page numbers. Lines A-C must appear on this page;
38 lines D-F must appear on the next page.</div>
39 <div class="spacer backup"></div>
40 <div class="dummy">
41 Page 1 Line A
42 Page 1 Line B
43 Page 1 Line C
44 Page 2 Line D
45 Page 2 Line E
46 Page 2 Line F
47 </div>
48 <div class="spacer">Lines G-L must appear on the next page.</div>
49 <div class="spacer backup"></div>
50 <div class="dummy" id="second">
51 Page 4 Line G
52 Page 4 Line H
53 Page 4 Line I
54 Page 4 Line J
55 Page 4 Line K
56 Page 4 Line L
57 </div>
58 <div class="spacer">Lines M-N must appear on this page; lines O-R on the next page.</div>
59 <div class="spacer backup"></div>
60 <div class="dummy" id="third">
61 Page 5 Line M
62 Page 5 Line N
63 Page 6 Line O
64 Page 6 Line P
65 Page 6 Line Q
66 Page 6 Line R
67 </div>
68 <div class="spacer">Lines S-X must appear on the next page.</div>
69 <div class="spacer backup"></div>
70 <div class="dummy" id="fourth">
71 Page 8 Line S
72 Page 8 Line T
73 Page 8 Line U
74 Page 8 Line V
75 Page 8 Line W
76 Page 8 Line X
77 </div>
78 </body>
79 </html>