How to vertically middle-align floating elements of unknown heights?

前端 未结 3 916
悲&欢浪女
悲&欢浪女 2020-11-27 03:57

I have a (horizontally) centered outer div containing two elements of unknown width:

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 04:36

    Nope this is when table cells suddenly seem like a great idea. If it is a fixed height you can use line-height.

提交回复
热议问题