Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-grid/abspos/positioned-grid-descendant-containing-block-013.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="match" href="positioned-grid-descendant-containing-block-013-expected.html">
<p>Test passes if the green abspos box (blue outline) sits at the top-left of the first grid area (red outline matches the grid item), inset by the grid container's padding (black outline).</p>
<div style="position: relative; display: grid; width: 400px; padding: 20px; grid-template-columns: 200px 200px; grid-template-rows: 200px 200px; outline: 1px solid black;">
<div style="grid-column: 1/2; grid-row: 1/2; outline: 1px solid red;">
<div style="position: absolute; grid-column: 1/2; grid-row: 1/2; width: 50%; height: 50%; background: green; outline: 1px solid blue;"></div>
</div>
</div>