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/page-margin-auto-and-non-zero-print.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="match" href="page-margin-auto-and-non-zero-print-ref.html">
<style>
@page {
size: 20em 7em;
border: solid;
margin: 30px;
}
@page aaa { }
@page bbb {
margin-top: auto;
}
@page ccc {
margin-bottom: auto;
}
@page ddd {
margin-top: auto;
margin-left: auto;
}
@page eee {
margin-top: auto;
margin-right: auto;
}
@page fff {
margin-bottom: auto;
margin-right: auto;
}
body {
margin: 0;
background: yellow;
}
</style>
<div style="page:aaa;">
center / middle
</div>
<div style="page:bbb;">
center / top
</div>
<div style="page:ccc;">
center / bottom
</div>
<div style="page:ddd;">
top / left
</div>
<div style="page:eee;">
top / right
</div>
<div style="page:fff;">
bottom / right
</div>