page-break-margins-001.xht (1151B)
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: Margin at the start of document</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="may paged"/> 9 <meta name="assert" content="The UA may preserve the margin after a forced 10 page break."/> 11 <style type="text/css"> 12 .test { 13 line-height: 1em; 14 margin-top: 4em; 15 position: relative; 16 color: blue; 17 page-break-before: always; 18 } 19 .margin { 20 position: relative; 21 bottom: 6em; 22 } 23 </style> 24 </head> 25 <body> 26 <div>This test requires 2 pages. Test passes if lines A through E appear 27 in order on the second page.</div> 28 29 <div class="test"> 30 <div>Page 2 Line D</div> 31 <div>Page 2 Line E</div> 32 <div class="margin">Page 2 Line A</div> 33 <div class="margin">Page 2 Line B</div> 34 <div class="margin">Page 2 Line C</div> 35 </div> 36 </body> 37 </html>