Hey @Damianeks,
congrats on completing your first challenge, it's looking very good 👍
There is a much easier way to center the card in this case.
If you give the body a min-height: 100vh
to cover the full viewport and then give the .content-box
a width, let's say of 20.6rem (according to the size you are aiming for), the card will be perfectly centered without having to specify the margins for the card, thanks to flexbox.
The code would look like this:
margin: 0px;
padding: 0px;
background-color: hsl(212, 45%, 89%);
align-items: center;
justify-content: center;
display: flex;
font-family: "Outfit", "sans-serif";
min-height: 100vh;
}
.content-box {
box-sizing: border-box;
background-color: hsl(0, 0%, 100%);
padding: 15px 15px;
border-radius: 20px;
height: 550px;
width: 20.6rem;
}
If you keep this in mind when centering something on the page, it will make your life much easier and the code cleaner.
If you have any questions, let me know, I'm here to help 😉
Happy coding 💪
Patrick