h1{ position: absolute; font-size: 30px; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #eee; padding: 30px; color:#f0f; }