# { margin:0; padding:0; } .masking { width:100%; height:100%; position:fixed; background:rgba(150,150,150,0.8); display:none; top:0; left:0; } .layer { position:relative; width:500px; height:300px; background:#ccc; border:3px solid #fff; left:50%; margin-left:-250px; top:50%; margin-top:-150px; } .close { position:absolute; right:15px; top:15px; }