page-container-005

Paged content

WeasyPrint

This browser

Flags
image, paged
Assertion
The page area includes the boxes laid out on that page. The content of the document is flowed into the page area of one or more page sheets.

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: Paged content</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-box">
  7   <link rel="help" href="http://www.w3.org/TR/css3-page/#page-box-page-rule">
  8   <meta name="flags" content="paged image">
  9   <meta name="assert" content="The page area includes the boxes laid out on that page. The content of the document is flowed into the page area of one or more page sheets. ">
 10   <style type="text/css">
 11     div {   page-break-inside: avoid;
 12         }
 13     html {  border: medium solid purple;
 14         }
 15     table, td, th {  
 16             border: thin solid black;
 17         }
 18     #borders-too {
 19             background: #ff9;
 20             border: medium #700 solid;
 21         }
 22     .left-aligned {
 23             float: left;
 24         }
 25     .right-aligned {
 26         float: right;
 27         }
 28     img {
 29         width: 25%;
 30         border: medium green solid;
 31         vertical-align:baseline;
 32 		 }
 33     h2 {
 34         clear: both;
 35         }
 36     .full-width {
 37         width: 100%;
 38         }
 39    </style>
 40  </head>
 41  <body>
 42   <div>The contents of this document include headings, "lorem ipsum" paragraphs with a background and a border, a list with bullets, two images, and a table. This test passes if all these items appear within a purple border which spans pages. 
 43   </div>
 44   <h2>Lorem Ipsum Text</h2>
 45   <div id="borders-too">
 46 	  <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus 
 47 	  hendrerit. Pellentesque aliquet nibh nec urna. In nisi neque, aliquet vel, 
 48 	  dapibus id, mattis vel, nisi. Sed pretium, ligula sollicitudin laoreet 
 49 	  viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam 
 50 	  mollis. Ut justo. Suspendisse potenti.</p>
 51 	  <p>Sed egestas, ante et vulputate volutpat, eros pede semper est, vitae 
 52 	  luctus metus libero eu augue. Morbi purus libero, faucibus adipiscing, 
 53 	  commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit 
 54 	  tortor. Sed semper lorem at felis. Vestibulum volutpat, lacus a ultrices 
 55 	  sagittis, mi neque euismod dui, eu pulvinar nunc sapien ornare nisl. 
 56 	  Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p>
 57 	  <p>Morbi interdum mollis sapien. Sed ac risus. Phasellus lacinia, magna a 
 58 	  ullamcorper laoreet, lectus arcu pulvinar risus, vitae facilisis libero 
 59 	  dolor a purus. Sed vel lacus. Mauris nibh felis, adipiscing varius, 
 60 	  adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque 
 61 	  mauris ut lectus. Nunc tellus ante, mattis eget, gravida vitae, ultricies 
 62 	  ac, leo. Integer leo pede, ornare a, lacinia eu, vulputate vel, nisl.</p>
 63 	  <p>Suspendisse mauris. Fusce accumsan mollis eros. Pellentesque a diam sit 
 64 	  amet mi ullamcorper vehicula. Integer adipiscing risus a sem. Nullam quis 
 65 	  massa sit amet nibh viverra malesuada. Nunc sem lacus, accumsan quis, 
 66 	  faucibus non, congue vel, arcu. Ut scelerisque hendrerit tellus. Integer 
 67 	  sagittis. Vivamus a mauris eget arcu gravida tristique. Nunc iaculis mi in 
 68 	  ante. Vivamus imperdiet nibh feugiat est.</p>
 69 	  <p>Ut convallis, sem sit amet interdum consectetuer, odio augue aliquam leo, 
 70 	  nec dapibus tortor nibh sed augue. Integer eu magna sit amet metus fermentum 
 71 	  posuere. Morbi sit amet nulla sed dolor elementum imperdiet. Quisque 
 72 	  fermentum. Cum sociis natoque penatibus et magnis dis parturient montes, 
 73 	  nascetur ridiculus mus. Pellentesque adipiscing eros ut libero. Ut 
 74 	  condimentum mi vel tellus. Suspendisse laoreet. Fusce ut est sed dolor 
 75 	  gravida convallis. Morbi vitae ante. Vivamus ultrices luctus nunc. 
 76 	  Suspendisse et dolor. Etiam dignissim. Proin malesuada adipiscing lacus. 
 77 	  Donec metus. Curabitur gravida.</p>
 78   </div>
 79   <div>
 80     <h2>Unordered List</h2>
 81   	<ul>
 82 		  <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
 83 		  <li>Aliquam tincidunt mauris eu risus.</li>
 84 		  <li>Vestibulum auctor dapibus neque.</li>
 85 		  <li>Nunc dignissim risus id metus.</li>
 86 		  <li>Cras ornare tristique elit.</li>
 87 		  <li>Vivamus vestibulum nulla nec ante.</li>
 88 		  <li>Praesent placerat risus quis eros.</li>
 89 		  <li>Fusce pellentesque suscipit nibh.</li>
 90 		  <li>Integer vitae libero ac risus egestas placerat.</li>
 91 		  <li>Vestibulum commodo felis quis tortor.</li>
 92 		  <li>Ut aliquam sollicitudin leo.</li>
 93 		  <li>Cras iaculis ultricies nulla.</li>
 94 		  <li>Donec quis dui at dolor tempor interdum.</li>
 95 		  <li>Vivamus molestie gravida turpis.</li>
 96 		  <li>Fusce lobortis lorem at ipsum semper sagittis.</li>
 97 		  <li>Nam convallis pellentesque nisl.</li>
 98 		  <li>Integer malesuada commodo nulla.</li>
 99 	  </ul>
100   </div>
101   <h2>Floated images</h2>
102   <div>
103     <span>There is an image of a kitten to the left 
104       <img class="left-aligned" alt="FAIL: missing image" src="support/mergatroid.png">and a couple 
105 	of dogs to the right
106       <img class="right-aligned" alt="FAIL: missing image" src="support/bg.png"> of this paragraph. Each image has a 
107 	green border on all sides.
108     </span>
109   </div>
110   <h2>Table</h2>
111   <table class="full-width">
112     <tr>
113       <th>Header1</th><th>Header2</th><th>Header3</th><th>Header4</th>
114     </tr>
115     <tr>
116       <td>Data 100</td><td>Data 200</td><td>Data 300</td><td>Data 400</td>
117     </tr>
118   </table>
119  </body>
120 </html>