position-absolute-root-element-ref.html (732B)
1 <!DOCTYPE html> 2 <html> 3 <meta charset="UTF-8"> 4 <title>CSS Position Reference: Box inset properties & position:absolute root element</title> 5 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 6 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 7 <link rel="author" title="Mozilla" href="http://www.mozilla.org/"> 8 9 <style> 10 html { 11 display: block; 12 position: absolute; 13 left: 10px; 14 right: 20px; 15 top: 30px; 16 bottom: 40px; 17 border: 5px dashed black; 18 box-sizing: border-box; 19 } 20 </style> 21 22 The black border should encompass the whole viewport, 23 with a bit of space on each side. 24 <br><br> 25 It shouldn't just shrinkwrap this text's height. 26 </html>