float-with-absolutely-positioned-child-with-static-inset.html (845B)
1 <!DOCTYPE html> 2 <link rel="author" title="Martin Robinson" href="mrobinson@igalia.com"> 3 <link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position"> 4 <link rel="match" href="float-with-absolutely-positioned-child-with-static-inset-ref.html"> 5 <meta name="assert" content="An absolutely positioned child of a float with a static inset should be positioned the same as a non-positioned child of that float." /> 6 7 <style> 8 #float { 9 float: right; 10 width: 250px; 11 } 12 13 #abs-child { 14 background: green; 15 position: absolute; 16 width: 100px; 17 height: 100px; 18 } 19 20 #abs-grandchild { 21 background: darkgreen; 22 position: absolute; 23 width: 50px; 24 height: 50px; 25 } 26 </style> 27 28 <body> 29 <div id="float"> 30 <div id="abs-child"> 31 <div id="abs-grandchild"></div> 32 </div> 33 </div> 34 </body> 35 </html>