How does the div in td center vertically?

clipboard.png

clipboard.png


clipboard.png

Css
Mar.15,2021

td .ant-row,td .cell {
    display: flex;
    align-items: center;
}

you have already used < table > Why put

in it? just do the table to the end.


ask the subject of the question, is it the div where the text is located? If the text is centered, first set a height to the div where the text is located, and then use either line-height or padding-top.


add vertical-align:middle to both div and picture;


set img, vertical-align:middle; the div where the text is located first set vertical-align:middle
, then set line-height to the div where the text is located


td set vertical-align:middle


.cell{
    display: table-cell;
}
.cell>div{
    display: inline-block;
    vertical-align: middle;
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36b94-2c02d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36b94-2c02d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?