Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<meta charset="utf-8">
<title>Reference: static position of a fixed-positioned child when the grid is not its containing block</title>
<style>
.grid {
display: grid;
grid: 50px 50px / 50px 50px;
margin: 40px;
border: 10px solid black;
padding: 20px;
}
.item {
width: 10px;
height: 10px;
background-color: green;
}
</style>
<div class="grid">
<div class="item"></div>
</div>