.index-layout { display: flex; flex-direction: column; justify-content: space-around; align-items: center; } @media only screen and (max-width: 639px) { .index-title { font-size: 5em; } } @media only screen and (min-width: 640px) { .index-title { font-size: 10em; } }