body{ position: relative; width: 100%; height: 100%; } div{ width:400px; height:400px; left:50%; top:50%; margin:-200px 0 0 -200px; }