Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-page/margin-boxes/content-007-print.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<meta name="assert" content="Test counter(page) and counter(pages) in page margin boxes, except on the first page, second page is named">
<!-- Using the ref from a preceding test, since they should be the same -->
<link rel="match" href="content-005-print-ref.html">
<style>
@page {
margin: 4em;
@top-center {
text-align: left;
vertical-align: top;
content: "Page " counter(page) " of " counter(pages);
}
@bottom-center {
text-align: left;
vertical-align: top;
content: "Page " counter(page) " of " counter(pages);
}
}
@page :first {
@top-center { content: none; }
@bottom-center { content: none; }
}
body {
margin: 0;
}
</style>
All pages except this one should display the current page and the total page
count in both the header and footer.
<div style="page:something;">
Another page
</div>
<div>
Yet another page
</div>