Equal Height Columns

adlib asked 12 months ago

In the tutorial on that page there is only three columns:

https://mdbootstrap.com/layout/bootstrap-equal-height-columns/

For which Pro version are they valid?

 

Thanks!


adlib answered 11 months ago

OK. Here is the code. I pasted it in the upper comment, though.
Regards!


adlib commented 11 months ago

I'm waiting for the answer. Still. :)


jivancic commented 10 months ago

I am also interested to hear .. what's the solution for that !


Ollie Vincent commented 10 months ago

Look below :)


This page is dedicated to the latest version of Bootstrap. It should work with every version of Bootstrap since alpha-6


adlib answered 11 months ago

And what about two columns: col-md-8 and col-md-4

Thanks!


Bartłomiej Malanowski commented 11 months ago

they're great, but what's the question?


adlib answered 11 months ago

Dear Bartłomiej,

I'm really sorry for the late answer! Beg my pardon!

I tried to make two cards with equal heights - following the same principle, but without success. And that's my question - two cards with equal heights?

Thanks!


Bartłomiej Malanowski commented 11 months ago

Please share your code with us


adlib commented 11 months ago

<code>
<section>
<div class="row">
<div class="col-md-8 mb-8 d-flex align-items-stretch">

<!--Form with header-->
<div class="card">

<div class="card-block">
<!--Header-->
<div class="form-header default-color" style="z-index: 2;">
<h3 class="h3-responsive">Lorem Ipsum</h3>
</div>
<!--Body-->
<div class="row text-center">
<div class="col-md-12 text-center">

<h3 class="section-heading">Lorem Ipsum is not simply random text.</h3>
<h4 class="section-heading blue-text"><strong>It is over 2000 years old</strong></h4>
<br>
<hr class="light">
<div class="text-justify">

<div class="panel-body text-center">
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites. Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites.
</div>

</div>

</div>
</div><!--/row-->

</div>
</div>
<!--/Form with header-->

</div>

<div class="col-md-4 mb-4 d-flex align-items-stretch">

<!--Form with header-->
<div class="card">

<div class="card-block">
<!--Header-->
<div class="form-header warning-color" style="z-index: 2;">
<h3 class="h3-responsive">Lorem ipsum</h3>
</div>
<!--Body-->
<div>
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites
</div>
</div>

</div>
<!--/Form with header-->

</div>
</div>
</section>
</code>


Bartłomiej Malanowski commented 10 months ago

Your code seems to work perfectly (I checked using MDB 4.4.3 with BS Beta-2). One thing that you should change is to remove .mb-4 class from the .col-md-4. Also, I noticed that you use .mb-8 class along with .col-md-8. That class doesn't exist in both Bootstrap and MDB. Is this your custom class?


Ollie Vincent answered 10 months ago

You could try this code from this link. I saved it onto Google Drive because it is really quite useful :)

https://docs.google.com/document/d/1DHTM9t47YjivqsLcC1XQT6F3onwyP2fwph6nU54c0No/edit?usp=sharing

 

Put JS in footer. In this example the class is js-equal-height. Paste this into all your elements that you want the same height.

 


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No