html,body { margin:0; padding:0; background:#525d5f; position:relative; width:100%; height:100%; } .content { width:500px; height:500px; position:absolute; top:50%; margin-top:-250px; left:50%; margin-left:-250px; box-shadow:5px 8px 2px #333; border-radius:2px; background:#000; } .content>div { width:25px; height:25px; border:1px solid #000; box-sizing:border-box; background:#fff; position:absolute; }