Disclaimer. This question was asked many times before. But since time has passed and now we are close to Bootstrap 4 release with full flexbox support, it is time for new answers for the same question.
I want to create equal column height with Bootstrap 4. Here is demo of intended result:
I want a solution, that works in all browsers, that are supported by Bootstrap 4. Better if no JS involved. Some of existing solution are based on Bootstrap 3, some aren't working in Safari on MacOS.
Update. Seems I did wrong research. Bootstrap 4 ships with equal height by default. I have included an updated image with illustration. You don't need to do anything, it is already there.
You just have to use class="row-eq-height" with your class="row" to get equal height columns for previous bootstrap versions.
To get it to the same height, add Bootstrap class h-100 to all the cards or use CSS height.
The two or more different div of same height can be put side-by-side using CSS. Use CSS property to set the height and width of div and use display property to place div in side-by-side format. The used display property are listed below: display:table; This property is used for elements (div) which behaves like table.
You just have to use class="row-eq-height"
with your class="row"
to get equal height columns for previous bootstrap versions.
but with bootstrap 4 this comes natively.
check this link --http://getbootstrap.com.vn/examples/equal-height-columns/
Equal height columns is the default behaviour for Bootstrap 4 grids.
.col { background: red; } .col:nth-child(odd) { background: yellow; }
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> <div class="container"> <div class="row"> <div class="col"> 1 of 3 </div> <div class="col"> 1 of 3 <br> Line 2 <br> Line 3 </div> <div class="col"> 1 of 3 </div> </div> </div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With