@KAPIL9027Submitted over 1 year ago
Centering the card both vertically and horizontally was a bit difficult to do but did it with flex anyway. Is there any other way of doing it?
Centering the card both vertically and horizontally was a bit difficult to do but did it with flex anyway. Is there any other way of doing it?
Flex is a great way of centering things. But you can also do it using grid. You can use the following snippet. It takes only two lines. Shorter then flex. I prefer to center things this way.
display: grid; place-items: center;