CSS - make all elements the same height as the tallest element

后端 未结 3 636
北海茫月
北海茫月 2020-12-30 09:19

I have a problem where I have three floating buttons in a div. one of the buttons has more content that the others, so it\'s taller.

I want to be able to make all bu

3条回答
  •  既然无缘
    2020-12-30 09:55

    You can do this cross browser without display:flex with the CSS rules padding-bottom: 999999em;and margin-bottom: -999999em;on the floated element this will force the webbrowser to render an equal height. And you need an overflow: hidden on the parent element

    see demo https://jsfiddle.net/xpdxyaz6/3/

提交回复
热议问题