xxxxxxxxxx
display: grid;
place-items: center;
height: 100vh;
xxxxxxxxxx
display:flex;
justify-content:center;
align-items:center
or
display:grid;
place-content:center;
xxxxxxxxxx
display: inline-block;
position: relative;
/* Move the element to the right by 50% of the container's width */
left: 50%;
/* Calculates 50% of the element's width, and moves it by that */
/* amount across the X-axis to the left */
transform: translateX(-50%);