<!doctype html> <html> <head> <style type="text/css"> #one { position:absolute; left:0px; top:0px; width:400px; height:400px; border:2px solid blue; background-color: rgb(160,160,160); opacity:0.8; z-index:1; } #two { position:absolute; top:100px; left:100px; width:200px; height:200px; z-index:0; background-color: rgb(255,0,0); } </style> </head> <body> <div id="two"></div> <div id="one"></div> </body> </html>