print_page_size2_ref.html (559B)
1 <!DOCTYPE html> 2 <style> 3 @page { 4 size: 20in 5in; 5 margin: 0; 6 } 7 div { 8 position: absolute; 9 background: blue; 10 width: 20px; 11 height: 20px; 12 } 13 .upper { 14 top: 0; 15 } 16 .lower{ 17 /* This accounts for the difference in @page{ size: ... }, as long as the 18 * page is placed aligned to the upper left corner of the paper. 19 */ 20 bottom: 2in; 21 } 22 .left{ 23 left: 0; 24 } 25 .right{ 26 right: 0; 27 } 28 </style> 29 <body> 30 <div class="upper left"></div> 31 <div class="upper right"></div> 32 <div class="lower left"></div> 33 <div class="lower right"></div> 34 </body>