Abdul Khalid 🚀• 72,160
@0xabdulkhalid
Posted
Hello @xTolux001 👋. Congratulations on successfully completing the challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
CSS 🎨:
- Looks like the component has been centered correctly. But the issue why the component is pushed from top because of
margin
.
- We don't need to use
margin
andpadding
to center the component both horizontally & vertically. Because usingmargin
orpadding
will not dynamical centers our component at all states, You already centered the component correctly. Now all you wanna do is just remove the following style rule
body {
margin: 50px auto;
}
- Now your component has been properly centered
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful
1