Home › Forums › CSS › [Solved] Centering an Item › Re: [Solved] Centering an Item
March 18, 2010 at 1:44 am
#72527
Member
margin: 0 auto;
is the same as:
margin: 0 auto 0 auto;
is the same as:
margin-top: 0;
margin-bottom: 0;
margin-left: auto;
margin-right: auto;
What it’s saying is, making the top and bottom margin zero (or whatever number you like, it has no change on it being centered). And then for the left and right margins, automatically even them out, depending on what size window the user has.