center component horizontally and vertically css code example
Example 1: css align center vertical and horizontal
.parent-class {
display: flex;
align-items: center;
justify-content: space-around;
}
Example 2: how to center a div element
/*ADD MARGIN auto to left and right*/
.box1{
width:80%;
margin:0 auto;
}