.center{ display: block; /* table */ width: 200px; height: 200px; color: #fff; background-color: black; position:absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; } .table { display: table; width: 100%; height: 100%; } .cell { display:table-cell; /* table-cell */ text-align:center; vertical-align:middle; /* table-cell 에서 적용*/ }
<div class='center'> <div class="table"> <p class="cell">Center</p> </div> </div>