Same height column bootstrap 3 row responsive

后端 未结 16 1792
难免孤独
难免孤独 2020-11-30 00:04

Hi I have four divs in a bootstrap row. I want all divs in this row to have the same height and not break responsibility. I don\'t know how to do this without breaking respo

16条回答
  •  余生分开走
    2020-11-30 00:33

    FYI - I did this to solve my issue to include responsive breakpoints which match the breakpoints in bootstrap. (I use LESS variables from bootstrap to synchronise the breakpoints but below is the compiled css version)

    @media (min-width: 0px) and (max-width: 767px) {
      .fsi-row-xs-level {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
      }
    }
    @media (min-width: 768px) and (max-width: 991px) {
      .fsi-row-sm-level {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
      }
    }
    @media (min-width: 992px) and (max-width: 1199px) {
      .fsi-row-md-level {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
      }
    }
    @media (min-width: 1200px) {
      .fsi-row-lg-level {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
      }
    }
    

    then added the classes to the parent which were required.

    column 1
    column 2
    column 3

提交回复
热议问题