Why magin:auto is not enough to center position absolute or fixed?
You need to refer to the specification to understand this. If your element is not positionned using position:absolute then you need to consider this section where you can read: If both ‘margin-left’ and ‘margin-right’ are ‘auto’, their used values are equal. This horizontally centers the element with respect to the edges of the containing block. … Read more