Center vertically a unknown height text in a unknown height div

后端 未结 3 2659
轮回少年
轮回少年 2021-02-20 15:00

I know this is a common issue, and I\'ve already asked a similar one. But I could not find the solution this time. I am trying to vertically center a text which can have differe

3条回答
  •  伪装坚强ぢ
    2021-02-20 15:23

    CSS with display solution:

    #test {
      display:table; 
    }
    
    #sumup {
      display:table-cell; 
    }
    

    The Demo http://jsfiddle.net/F8TtE/7/

提交回复
热议问题