div#rectanglearea { width: 600px; height: 200px; border: 1px solid black; overflow: hidden; position: relative; } div.rect { width: 80px; height: 80px; border: 2px solid black; position: absolute; }