html, body, #main { height: 100%; } #main { display: flex; align-items: center; padding-top: 40px; padding-bottom: 40px; }