page-props-100-b

Unqualified Page Contexts (first, left)

WeasyPrint

This browser

Flags
paged
Assertion
A margin declaration within a page context which is not qualified by a pseudo-class (or, for css3, a named page identifier) sets the margins for every page of the document which doesn't match a page context with a :first, :right, or :left pseudoclass (or, for css3, a named page identifier).

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: Unqualified Page Contexts (first, left)</title>
 5   <link rel="author" title="Melinda Grant" href="mailto:melinda.grant@hp.com">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-margins">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-selectors">
 8   <link rel="help" href="http://www.w3.org/TR/css3-page/#at-page-rule">
 9   <meta name="flags" content="paged">
10   <meta name="assert" content="A margin declaration within a page context which is not qualified by a pseudo-class (or, for css3, a named page identifier) sets the margins for every page of the document which doesn't match a page context with a :first, :right, or :left pseudoclass (or, for css3, a named page identifier).">
11   <style type="text/css">
12     @page {
13         margin: 7%;
14     }
15     @page :first {
16         margin-left: 50%;
17     }
18     @page :left {
19         margin-left: 50%;
20     }
21     p {
22         page-break-after: always;
23     }
24    </style>
25  </head>
26  <body>
27    <p>
28      This test produces four pages on paged media.
29      <br>
30      <br>
31      The text on this page is entirely on the right half of the page.
32    </p>
33    <p>
34      This text on page two is also entirely on the right half of the page.
35    </p>
36    <p>
37      This text on page three begins near the left edge of the page.    
38    </p>
39    <p>
40      This text on page four is entirely on the right half of the page.    
41    </p>
42  </body>
43 </html>