.container { display: flex; flex-direction: column; justify-content: center; align-items: center; left: 0px; top: 0px; width: 100%; height: 100%; } .title { font-size: 60px; text-align: center; width: 100%; height: 40%; margin: 10px; } @media screen and (device-type: phone) and (orientation: landscape) { .title { font-size: 60px; } } @media screen and (device-type: tablet) and (orientation: landscape) { .title { font-size: 100px; } }