block-abs-pos-1.html (763B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <!-- Note: CSS 2.1 allows guessing the static position of an absolutely 5 positioned element whose offsets are 'auto' (initial value), i.e. 6 the reference of this test is just one of many possible outcomes. 7 See http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width --> 8 <style type="text/css"> 9 #in-flow-top { 10 height: 20px; 11 margin-bottom: 20px; 12 background-color: green; 13 } 14 #abs-pos { 15 position: absolute; 16 width: 20px; height: 20px; 17 background-color: blue; 18 margin-top: 10px; 19 margin-bottom: 10px; 20 } 21 #in-flow-bottom { 22 height: 20px; 23 margin-top: 20px; 24 background-color: lightgreen; 25 } 26 </style> 27 </head> 28 <body> 29 <div id="in-flow-top"></div> 30 <div id="abs-pos"></div> 31 <div id="in-flow-bottom"></div> 32 </body> 33 </html>