css box model | Sololearn: Learn to code for FREE!


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.

11/30/2018 10:25:36 PM


2 Answers

New Answer


I think what you want is to do both margin-left: auto; and margin-right: auto; along with a width percentage to center horizontally.