When we want page’s main container align center, we usually use "margin: 0 auto;", but when I use "margin:auto;", behaviour are the same in some browser I have (Google Chrome, Firefox).
When we want page’s main container align center, we usually use margin: 0 auto;
Share
Yes.
Sets the element’s left and right margins to
auto, and the top and bottom margins to0.Sets all the margins to
auto. You are probably getting the same behaviour due to your<body>being 100% height, hence the verticalautomargins have no effect.