How to make columns the same height, regardless of content, and vertically-align buttons within those columns?

后端 未结 3 1752
半阙折子戏
半阙折子戏 2020-12-04 01:08

I\'m trying to make a column layout, with content in each, and I want them to be the same height but I\'m not able to get it to work.

One of the columns is higher th

3条回答
  •  清歌不尽
    2020-12-04 01:55

    You could do equal height columns technique:

    .row {
        overflow:hidden;
    }
    .span4 {
        padding-bottom:32767px;
        margin-bottom:-32767px;
    }
    

    To achieve vertically centered text content is really tricky. I would try using

    .row {
        display:table;
    }
    .span4 {
        display:table-cell;
        vertical-align:middle;
    }
    

    but you'll have to tweak it further and I'm not sure if it will really work out and which browsers do support it really.

提交回复
热议问题