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

后端 未结 3 622
北海茫月
北海茫月 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:51

    How about using min-height? updated fiddle

     .container {
       width: 320px;
     }
     .container button {
       float: left;
       background: #FFFFFF;
       border: 1px solid #CCCCCC;
       width: 33.33%;
       min-height: 40px;
     }

提交回复
热议问题