HTML center content through margin auto not working

前端 未结 6 1659
轻奢々
轻奢々 2021-01-19 12:59

I have the following Html code

Team

6条回答
  •  南笙
    南笙 (楼主)
    2021-01-19 14:02

    #team { 
        margin: auto; 
        width: 400px;
    }
    

    Basically margin depends on width if and only if we want to show our div in the center of the page.

提交回复
热议问题