HTML CSS examples for CSS Layout:Margin
Use negative margin
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div {<!-- w w w . ja v a2 s . c o m--> width: 100px; height: 100px; border: solid 10px #999; } .top-element { background: red; } .bottom-element { background: blue; margin-left: 10px; margin-top:-10px; } </style> </head> <body> <div class="top-element"> </div> <div class="bottom-element"> </div> </body> </html>