<container>
<div>static</div>
<relative>relative</relative>
<div>static</div>
<div>static</div>
<div>static</div>
</container>
container {
width: 500px;
height: 800px;
background-color: gray;
display:flex;
}
div {
display:flex;
width: 100px;
height: 100px;
background-color: white;
border: 1px solid black;
text-align:center;
align-items:center;
justify-content:center;
}
relative {
display:flex;
position:relative;
width: 100px;
height: 100px;
background-color: yellow;
border: 1px solid black;
text-align:center;
align-items:center;
justify-content:center;
top: 50px;
left: 50px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.