How the text is vertically centered on the div of unknown height

I would like to ask, this kind of layout which is similar to the cell, the first two are fixed, and the contents in the back red box can be added. How can we make the front text center vertically?

Mar.09,2021

this is a classic problem of css. There are no particularly good methods in the original css, but there are some alternatives, such as setting line-height, or using table,. Here are many detailed methods https://stackoverflow.com/que.

.

but my suggestion is to use the new flex layout directly, which is easier to understand and easier to maintain. There is also a way to center using flex in the link above.


display:{ table-cell;
            vertical-align:middle}

flex layout can also add span to the font
you can see Ruan Yifeng flex layout

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-1e50687-43661.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-1e50687-43661.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?