I got two columns that I want to have in the same hight. Both are adjusting height after the content (height auto). So sometimes one of my columns has a bigger height then the other one. And I want them to be in the same height (and adjust after the content).
I have tried to solve this with table-cell but I did'nt get it to work (one of the columns always was 10px or so smaller then the other one). I have also tried to use row-eq-height but that did'nt make any difference.
So can anyone tell me what the best way is to get two paralell BS columns (col-md-3 and col-md-7 in the code) to get the same height, and auto-adjust to content?
Here is my Markup:
<div class="row"> <!-- START BS ROW -->
<div class="col-md-1"> <!-- START BS COL-MD-1 -->
</div> <!-- END BS COL-MD-1 -->
<div class="col-md-3 zeropadding-right"> <!-- START BS COL-MD-4 -->
<div class="singleheader-list-style"> <!-- START SINGLEHEADER-LIST-STYLE -->
<!-- CONTENT -->
</div>
</div> <!-- END BS COL-MD-3 -->
<div class="col-md-7 zeropadding-left"> <!-- START BS COL-MD-7 -->
<div class="singleheader-content-style"> <!-- START SINGLEHEADER-CONTENT-STYLE -->
<!-- CONTENT -->
</div> <!-- END SINGLEHEADER-CONTENT-STYLE -->
</div> <!-- END BS COL-MD-7 -->
<div class="col-md-1"> <!-- START BS COL-MD-1 -->
</div> <!-- END BS COL-MD-1 -->
</div> <!-- END BS ROW -->
Here is my CSS:
/***** SINGLEHEADER CONTENT AREA STYLING *****/
.singleheader-content-style {
background-color:#fff;
border-right: 1px solid #9c9c9c;
padding:20px;
}
.singleheader-content-style h1,h2,h3,h4,h5,h6 {
margin-top:0px; /* Change bootstrap default */
color:#de1b1b;
}
/***** SINGLEHEADER LIST AREA STYLING *****/
.singleheader-list-style {
background-color:#fff;
border-left: 1px solid #9c9c9c;
border-right: 1px solid #9c9c9c;
padding:20px;
}
.singleheader-list-style h1,h2,h3,h4,h5,h6 {
margin-top:0px; /* Change bootstrap default */
color:#de1b1b;
}
Yes, I know this question is asked for example here: How can I make Bootstrap columns all the same height? but that QA is from 2013. I want to know if there is a better way to solve this now adays, with example flex-box and how to do it. I have been looking here: http://getbootstrap.com.vn/examples/equal-height-columns/ But it is'nt working for me.