“vertical-align: middle” does not align to the middle in Firefox

后端 未结 5 1822
执念已碎
执念已碎 2021-02-02 10:25

I\'m trying to align some text of different sizes vertically, however, Firefox displays the smaller text way above the middle.

CSS:

div.categoryLinks {
          


        
5条回答
  •  被撕碎了的回忆
    2021-02-02 10:50

    Firefox is rendering correctly. The vertical-align property is inline, which means it doesn't apply to block elements like

    (and

    , etc). Try adding display: inline and see if that works.

提交回复
热议问题