transform: translate(-50%, -50%)

digital diary

This text block is vertically centered.

Horizontally, too, if the window is wide enough.