@dtp27
Posted
Hi Yoseif!
Great solution! Another way to center your component, because you're actually really close with using Flexbox in the body, is to add min-height: 100vh;
. This will make sure the body takes up the entire viewing area, which will result in Flexbox centering the component in the view.
One thing I would caution about using fixed position is that it takes the element out of normal flow and can cause interesting and unintended side effects when dealing with more components on the page.
Happy coding!
Dan
Marked as helpful