I checked MDN to see what means to have an auto value for margin property and it says: \"auto is replaced by some suitable value, e.g. it can be used for centering
Auto margins
Depending upon the circumstances, provision of an auto value instructs the browser to render a margin according to the value provided in its own stylesheet. However, when such a margin is applied to an element with a meaningful width, an auto margin instead causes all of the available space to be rendered as whitespace.
From w3.org