.container { display: flex; flex-direction: column; align-items: center; justify-content: center; } form { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; width: 80%; } form > * { width: 100%; } form :nth-child(even) { margin-bottom: 1rem; } form > button { width: 100%; padding: 0.25rem; margin: 0.5rem; } @media (min-width: 769px) { form { gap: 1rem; width: 100%; max-width: 48rem; display: grid; column-gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); } form > button { width: 100%; grid-column: span 2; padding: 0.25rem; margin: 0.5rem; } } nav { display: flex; padding: 0.5rem 0rem; background-color: #8aacdf; position: sticky; top: 0; left: 0; right: 0; margin-left: -0.5rem; margin-top: -0.5rem; justify-content: space-around; align-items: center; width: 100vw; margin-bottom: 4rem; } .navitem { padding: 0.5rem 4rem; border: 1px solid #000; border-radius: 0.5rem; } #footer { width: 100vw; height: 6rem; position: absolute; bottom: 0; left: 0; justify-content: space-around; align-items: center; background-color: #000; color: #fff; text-align: center; display: flex; vertical-align: center; font-size: 2rem; }