How to vertically align 2 different sizes of text?

后端 未结 8 619
终归单人心
终归单人心 2020-12-02 13:48

I know to vertically align text to the middle of a block, you set the line-height to the same height of the block.

However, if I have a sentence with a word in the m

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 14:51

    Try vertical-align:middle; on inline containers?

    EDIT : it works but all your text must be in an inline container, like this :

        
    test test

提交回复
热议问题