how to center in absolute position

CSS
position: absolute;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
text-align: center;
Source

Also in CSS: