Minimum height for div or span with empty element

后端 未结 2 1555
一生所求
一生所求 2021-02-05 16:41

When I enclose within span or div a string that happens to be an empty string or includes only white spaces, that part does not have any height, and wh

2条回答
  •  不知归路
    2021-02-05 17:20

    Your code isn't right: you don’t need enclosing quotes ("") around values in CSS.

    Either use:

    min-height: 1em; /* I am not sure if one can use em with height properties */
    

    Or use:

    min-height: 12px;
    

提交回复
热议问题