@correlucas
Posted
👾Hello Juan Sebastian, Congratulations on completing this challenge!
Great solution and great start! By what I saw you’re on the right track. I’ve few suggestions to you that you can consider to add to your code:
Your component is okay but its missing the vertical alignment. The best way to do it is by using flexbox
. First step is to add min-height: 100vh
to make the body height size becomes 100% of the screen height, this way you make sure that whatever the situation the child element (the container) align the body and then use the flex properties for alignment with display: flex
/ align-items: center;
/ justify-content: center;
body {
min-height: 100vh;
font-family: 'Outfit', sans-serif;
background-color: var(--light-gray);
padding: 10px;
align-items: center;
max-width: 370px;
display: flex;
justify-content: center;
flex-direction: column;
}
For future projects, think about using relative units as rem
or em
instead of px
to improve your performance by resizing fonts between different screens and devices.
✌️ I hope this helps you and happy coding!