How is the css text centered?

text wraps lines automatically, and neither text-algin nor
vertical-align works. Is there any way not to use display:table-cell,?
 .cell {
        float: left;
        width: 40px;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        word-break: break-all;
        line-height: 23px;
        padding-left: 10px;
        padding-right: 10px;
        height: 120px;
        text-align: center;
    }
<div class="cell"></div>
<div class="cell"></div>

clipboard.png

Css
May.22,2021

flex layout
display:flex;
align-items: center;


this is easier with flex layouts.

.xxx{
   display:flex;
   justify-content: center;
   align-items: center; 
}

line-height


Please check the code

Menu