position 2 absolute

PHOTO EMBED

Fri Sep 15 2023 10:18:30 GMT+0000 (Coordinated Universal Time)

Saved by @Mohammadrezasmz

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatib1e" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
< link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>

<!-- الان پرنت چایلد شد-->
<div class="div1">
<div class="div2"></div>
</div>
</body>
</html>

file style.css

.div1{
background-color: blue;
width: 400px;
height: 400px;
position: relative;
top:250px;
}
.div2{
background-color: yellow;
width: 200px;
height: 200px;
position: absolute;
left:500px;
}
example picture:https://i.stack.imgur.com/gz265.png
content_copyCOPY

position 2 absolute