inline-level-absolute-in-block-level-context-008.html (888B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" /> 3 <link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> 4 <meta name="assert" content="Tests the static position of inline-level absolute-positioned elements, with combinations of float, direction, and text-align." /> 5 <style> 6 #container { position: relative; background: red; width: 100px; height: 100px; } 7 #container > div { background: green; } 8 #inflow { height: 50px; } 9 #float { float: left; width: 50px; height: 50px; } 10 #abs { display: inline; position: absolute; width: 50px; height: 50px; } 11 </style> 12 <p>Test passes if there is a filled green square.</p> 13 <div id=container style="direction: rtl; text-align: center;"> 14 <div id=inflow></div> 15 <div id=float style="float: left;"></div> 16 <div id=abs style="transform: translateX(50%);"></div> 17 </div>