<div class="content">
  <div class="square"></div>
</div>  
*, *::before, *::after {
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

body {
  background-color: black;
  height: 100vh;
}

.content {
  --positionX: 0;
  --positionY: 0;

  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.square {
  width: 100px;
  height: 100px;
  background: white;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.