.elem { width: 100vmin; height: 100vmin; margin-top: calc((100vh - 100vmin)/2); margin-left: calc((100vw - 100vmin)/2); }