<!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
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter