content-007-print.html (1089B)
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, second page is named"> 5 <!-- Using the ref from a 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 All pages except this one should display the current page and the total page 31 count in both the header and footer. 32 <div style="page:something;"> 33 Another page 34 </div> 35 <div> 36 Yet another page 37 </div>