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: Page cascade (first trumps no pseudo-class)</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-selectors">
7 <link rel="help" href="http://www.w3.org/TR/css3-page/#cascading-and-page-context">
8 <meta name="flags" content="paged">
9 <meta name="assert" content="Properties specified in a :first @page rule override those specified in an @page rule with no pseudo-class specified.">
10 <style type="text/css">
11
12 @page {
13 margin: 7%;
14 margin-right: 2in;
15 }
16 @page:first{
17 margin-top: 2in;
18 }
19 div {
20 page-break-after: always;
21 border-top: medium blue solid;
22 border-right: medium orange solid;
23 padding: .5em;
24 }
25
26 </style>
27 </head>
28 <body>
29 <div>
30 This test produces just this one page. The blue bar above this text is 2 inches below the top edge of the medium. The orange bar to the right is 2 inches from the right edge of the medium.
31 </div>
32 </body>
33 </html>