content-006-print.html (1191B)
1 <!DOCTYPE html> 2 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> 3 <link rel="help" href="https://drafts.csswg.org/css-page-3/#page-based-counters"> 4 <meta name="assert" content="Test counter(page) and counter(pages) in page margin boxes, except on the first page. Everything is absolute-positioned."> 5 <!-- Using the ref from the preceding test, since they should be the same --> 6 <link rel="match" href="content-005-print-ref.html"> 7 <style> 8 @page { 9 margin: 4em; 10 11 @top-center { 12 text-align: left; 13 vertical-align: top; 14 content: "Page " counter(page) " of " counter(pages); 15 } 16 @bottom-center { 17 text-align: left; 18 vertical-align: top; 19 content: "Page " counter(page) " of " counter(pages); 20 } 21 } 22 @page :first { 23 @top-center { content: none; } 24 @bottom-center { content: none; } 25 } 26 body { 27 margin: 0; 28 } 29 </style> 30 <div style="position:absolute;"> 31 All pages except this one should display the current page and the total page 32 count in both the header and footer. 33 <div style="break-before:page;"> 34 Another page 35 </div> 36 <div style="break-before:page;"> 37 Yet another page 38 </div> 39 </div>