How css sets the row height to 100% of the element height

    line-height: ???;

do not want to set a fixed px, because it will change, how to set it to follow the element height 100%?

Feb.24,2022

vertical-align:middle;display:inline-block;


pinch like this

line-height:calc(100% - 0px);

if you just want the text to be centered vertically, you can use display:table-cell; or flex


line-height:1


if you don't mind the amount of code, you can center it by positioning, which is not recommended. Flex


is recommended.

increase pseudo class, 100% height. Then modify the horizontal center.

http://jsrun.net/eChKp/edit

clipboard.png

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