When you have specified a
width on the object that you have applied
margin: 0 auto to, the object will sit centrally within it’s parent container.
auto as the second parameter basically tells the browser to automatically determine the left and right margins itself, which it does by setting them equally. It guarantees that the left and right margins will be set to the same size. The first parameter 0 indicates that the top and bottom margins will both be set to 0.
margin-top:0; margin-bottom:0; margin-left:auto; margin-right:auto;