How to do the alignment with the absolute?

How to do the alignment with the absolute?
March 19th 20 at 08:53
2 answers
March 19th 20 at 08:55
Solution
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
March 19th 20 at 08:57
Solution
.block {
position: absolute;
right: 0;
left: 0;
margin: 0 auto;
}

Find more questions by tags LayoutHTMLCSS