Hello thilisadiki,
Congrats on completing your first challenge👏
To center the card properly, you might want to use CSS flexbox or grid.
Example using CSS Flexbox:
Add the following code to the body:
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
You can thus remove the margin from your style :
.main-card {
margin: 6rem auto;
}
Helpful links:
CSS Flexbox :
CSS grid:
You might want to have a look at the following as well:
I hope these will be helpful to you 😉
Good luck going forward and happy coding 🙂