Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<style>
#canvas {
width: 300px;
height: 200px;
background: #ccc;
position: relative;
}
#child {
width: 100px;
height: 200px;
background: green;
position: absolute;
top: 0;
left: 0;
}
#grandchilda {
width: 50px;
height: 50px;
background: blue;
position: absolute;
top: 0;
left: 100px;
}
#grandchildb {
width: 50px;
height: 50px;
background: yellow;
position: absolute;
top: 50px;
left: 0;
}
#grandchildc {
width: 50px;
height: 50px;
background: purple;
position: absolute;
top: 0;
left: 200px;
}
</style>
<div id="canvas">
<div id="child"></div>
<div id="grandchilda"></div>
<div id="grandchildb"></div>
<div id="grandchildc"></div>
</div>