DEV Community

loading...

Discussion on: How to center an element in HTML using CSS Flexbox and CSS grid.

Collapse
amaan56 profile image
Amaan Shaikh Author

I used to use margin:auto property but this would only align the item horizontally, for vertical alignment I used to play with margin and padding values until I get the right alignment.