position-absolute-in-inline-004.html (887B)
1 <!DOCTYPE html> 2 <title> 3 Out-of-flow positioned element with inline containing block. 4 </title> 5 <link rel="help" href="https://www.w3.org/TR/css-position-3/#abspos-breaking"> 6 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 7 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 8 <style> 9 #container { 10 height: 100px; 11 width: 100px; 12 font: 20px/1 Ahem; 13 color: white; 14 background-color: red; 15 } 16 .abs { 17 position: absolute; 18 background-color: green; 19 height: 100px; 20 width: 50px; 21 top: -50px; 22 } 23 </style> 24 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 25 <div id="container"> 26 <div style="height: 50px;"></div> 27 BBBB 28 <span style="position: relative;"> 29 <div class="abs" style="left: -30px;"></div> 30 AA A AA AAAA 31 <div class="abs" style="left: -80px;"></div> 32 </span> 33 </div>