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

+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.

11/30/2018 10:25:36 PM

harshit

2 Answers

New Answer

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.

0