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
#main {
width: 600px;
margin: 0 auto;
}
Setting the width of a block-level element will prevent it from stretching out to the edges of its container to the left and right. Then, you can set the left and right margins to auto to horizontally center that element within its container. The element will take up the width you specify, then the remaining space will be split evenly between the two margins.