Hello.

If two words are one larger and the other smaller. How to make these words aligned on the same axis on the css?

Thank.

PS The axis is the median line, if that.

    2 answers 2

    You can try this:

    div span { vertical-align: middle; } 

    Example

    UPD. no need to set line-height

    • @ soledar10 this is my case - devtwo
    • In this case, for the div, don't you need to give display: table-cell; ? - Dmitry Klimenko
    • Not. But this property also works for inline-block for table-cell .. well, etc. - inferusvv

    Use one line-height leading for each word.