html, body { height: 100%; display: flex; flex-direction: column; } .Container { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; } .nav-link { color: black; margin: 5px; } @media only screen and (max-width: 400px) { .nav-link { color: black; font-size: 12px; } }