internal-containing-block-001.html (1311B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <link rel="author" title="David Grogan" href="dgrogan@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-tables-3/#abspos-boxes-in-table-internal"> 5 <link rel="help" href="https://www.w3.org/TR/css-position-3/#valdef-position-absolute"> 6 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 7 <link rel="bookmark" href="https://bugs.chromium.org/p/chromium/issues/detail?id=798164" /> 8 <meta name="assert" content="A table-row with position:relative establishes a 9 containing block for a position:absolute descendent of a table-cell, and the 10 descendent is positioned correctly." /> 11 <title> 12 relpos table-row establishes containing block for abspos 13 </title> 14 15 <style> 16 tr { 17 position: relative; 18 } 19 20 div.abspos { 21 position: absolute; 22 height: 50px; 23 width: 100px; 24 background: green; 25 } 26 27 div.static { 28 height: 50px; 29 width: 100px; 30 background:red; 31 } 32 33 td, tr { 34 margin:0px; 35 padding:0px; 36 } 37 38 table { 39 border-collapse:collapse; 40 } 41 </style> 42 43 <p>Test passes if there is a filled green square and <strong>no red</strong>. 44 </p> 45 46 <table> 47 <tr> 48 <td> 49 <div class="abspos"></div> 50 <div class="static"></div> 51 </td> 52 </tr> 53 <tr> 54 <td> 55 <div class="abspos"></div> 56 <div class="static"></div> 57 </td> 58 </tr> 59 </table>