containing-block-024

Containing block and absolutely positioned element in paged media

WeasyPrint

This browser

Flags
paged
Assertion
An absolutely positioned element ignores page breaks in paged media.

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: Containing block and absolutely positioned element in paged media</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">
 7         <meta name="flags" content="paged">
 8         <meta name="assert" content="An absolutely positioned element ignores page breaks in paged media.">
 9         <style type="text/css">
10             @media print
11             {
12                 #print
13                 {
14                     display: none;
15                 }
16                 p
17                 {
18                     margin-top: 1.1in;
19                     page-break-after: always;
20                 }
21                 div
22                 {
23                     border: solid black;
24                     height: 1in;
25                     left: 0;
26                     position: absolute;
27                     top: 0;
28                     width: 1in;
29                 }
30             }
31         </style>
32     </head>
33     <body>
34         <p id="print">PREREQUISITE: Switch to paged media view.</p>
35         <p>Test passes if there is a black box above.</p>
36         <div></div>
37     </body>
38 </html>