+ 2
css box model
If we use margin:auto; then equal margin will be applied only to the left and right of the element and not all the sides.
2 ответов
+ 2
box
0
I think what you want is to do both margin-left: auto; and margin-right: auto; along with a width percentage to center horizontally.