first-page-selectors-003

Page Selectors - First Page in LTR Forced :left

WeasyPrint

This browser

Flags
may, paged
Assertion
The first page of a left-to-right document can be forced as :left by inserting a page break.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html dir="ltr">
 3  <head>
 4   <title>CSS Test: Page Selectors - First Page in LTR Forced :left</title>
 5   <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-selectors">
 7   <meta name="flags" content="paged may">
 8   <meta name="assert" content="The first page of a left-to-right document     can be forced as :left by inserting a page break.">
 9   <style type="text/css">
10     @page:first {
11       margin-top: 50%;
12     }
13     @page:left {
14       margin-left: 50%;
15     }
16     @page:right {
17       margin: 0;
18     }
19     html {
20       page-break-before: left;
21       margin: 0; padding: 0.2em;
22       border: solid blue;
23       border-width: thick thin thin thick;
24     }
25   </style>
26  </head>
27  <body>
28    <p>When printed the top left corner of this box must be in
29      the exact center of this page.</p>
30  </body>
31 </html>