The idea
A block element with a set width and margin-left: auto; margin-right: auto splits the leftover space evenly — that is what centres it. margin: 0 auto is the shorthand you will write a thousand times.
This one is checked at two stage widths, so it has to stay centred as the stage resizes.
Validated at two stage widths: a hardcoded left margin centres at one and misses at the other.