.top,.bottom{ width: 100px; height: 100px; margin: 10px; } .top{ background-color: pink; } .bottom{ position: absolute; background-color: blueviolet; }