@danielmrz-dev
Posted
Hello there!
Congrats on completing the challenge! ā
Your project is looking fantastic!
I'd like to suggest a way to make it even better:
- Using
margin
isn't always the most effective method for centering an element.
Here's a highly efficient approach to position an element at the center of the page both vertically and horizontally:
š Apply this CSS to the body (avoid using position
or margins
in order to work correctly):
body {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
I hope you find this helpful!
Keep up the excellent work!
Marked as helpful
@dimisleif
Posted
@danielmrz-dev
Thank you so much for your suggestions! I will be going back and fixing it up well :) For some reason, the first time I tried to center elements this way, it didn't work out quite well but I think I did not think to apply it to the body element!
I appreciate your suggestion and your comment, have a good day! :)