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