I was searching the archives and came across the following article about how to center a div within a div, where the solution was to apply the following styles to the inner div:
#inner {
width: 50%;
margin: auto;
}
The answer states that the margin:auto
is what causes the centering. How exactly does this work?