margin-left: auto and margin-right: auto not working on input

后端 未结 7 975
闹比i
闹比i 2021-02-01 01:25

I have an input in a form that I am trying to align in the center. Usually margin-left:auto and margin-right: auto fail to respond when display:

7条回答
  •  离开以前
    2021-02-01 01:54

    in addition to specifying width and display block also check if the float property is set to none.

提交回复
热议问题