Why does this inline-block element have content that is not vertically aligned

前端 未结 4 1194
一向
一向 2020-11-22 07:30

Came across a weird CSS issue. Can someone explain why the box having content is not vertically aligned?

If you put text inside the span with class .divPutText

4条回答
  •  野性不改
    2020-11-22 08:06

    Add vertical-align:top in your .divAccountData, .divAccountPicker class as like this

    .divAccountData, .divAccountPicker {
        vertical-align: top;
    }
    

    LIve demo

    If you used to display:inline-block; than used to all-ways vertical-align:top

提交回复
热议问题