You managed to center the card perfectly and it stays centered on all sizes, so good job.
Instead of using margin: 0 auto;
you can use the flexbox property align-items: center;
.
main {
height: 100vh;;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.secao {
width: 250px;
background-color: hsl(0, 0%, 100%);
border-radius: 10px;
padding: 15px 15px 30px;
}
In this case the main's flex-direction: column;
can be left out because the default flex-direction: row;
already allows us to center it with justify-content: center;
and align-items: center;
.
This would give us:
main {
height: 100vh;;
display: flex;
justify-content: center;
align-items: center;
}
You can also decide to use grid:
main {
height: 100vh;;
display: grid;
place-items: center;
}
.secao {
width: 250px;
background-color: hsl(0, 0%, 100%);
border-radius: 10px;
padding: 15px 15px 30px;
}
Also, I think moving box-sizing
and font-family
would be an improvement, since we want them to apply to all our elements:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Outfit', sans-serif;
}
I recommend checking out https://mastery.games/flexboxzombies/ and https://cssgridgarden.com/ to learn more about flexbox and grid!