page-break-inside-002

page-break-inside (inline elements)

WeasyPrint

This browser

Flags
paged
Assertion
The 'page-break-inside' property applies to block-level elements only.

Source

 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: page-break-inside (inline elements)</title>
 5 <link rel="author" title="Tom Clancy" href="mailto:tclancy@revenution.com">
 6 <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-break-props">
 7 <meta name="flags" content="paged">
 8 <meta name="assert" content="The 'page-break-inside' property applies to block-level elements only.">
 9 <style type="text/css">
10 	* {
11 		margin: 0;
12 		padding: 0;
13 		orphans: 1;
14 		widows: 1;
15 	}
16 	html, body {
17 		height:100%;
18 		line-height: 1;
19 		font-size: 16pt;
20 	}
21 	div.spacers {
22 		height: 50%;
23 	}
24 	div#backUp {margin-top: -2em;}
25 	div.break {
26 		width: 0;
27 	}
28 	span {page-break-inside: avoid;}
29 
30 </style>
31 </head>
32 <body>
33 	<div class="spacers">&nbsp;</div>
34 	<div class="spacers" id="backUp">The text below should break onto two pages, with only the letter 'c' appearing on the second page.</div>
35 	<div class="break">
36 		<span>a b c</span>
37 	</div>
38 </body>
39 </html>