center things in css code example
Example 1: centering css elements
// add to the parent element
.parent {
display: grid;
place-items: center;
}
Example 2: how to make things center using css
// add to the parent element
.parent{
height:100vh;
display:flex;
justify-content: center;
align-items: center;
}
or you can use
.parent{
height:100vh;
display:gird;
place-item:center;
}