centering block elements css code example
Example 1: centering css elements
// add to the parent element
.parent {
display: grid;
place-items: center;
}
Example 2: center css elements
body{
display: grid;
place-items: center;
}
// add to the parent element
.parent {
display: grid;
place-items: center;
}
body{
display: grid;
place-items: center;
}