CSS: Why “vertical-align: middle” does not work?

前端 未结 8 1092
无人及你
无人及你 2021-02-13 06:24

Consider the following example: (live demo here)

HTML:



        
8条回答
  •  灰色年华
    2021-02-13 07:06

    You should have display: table-cell I think, this works only in tables.. I use line-height equal to height of the element and it works too.

提交回复
热议问题