I'm using AngularJS Material and am running into an issue trying to get md-cards to be the same height. On the screen, the cards are the same height, but I really only want the content portion to grow to fill in the free space. Below you can see that my cards are the same height, but I want my image and image title to stay put, while everything below grows to fit the greatest height:
My code for the cards look something like this:
<md-card>
<div class="md-card-image-and-title">
<img src="first_day.png" class="md-card-image" alt="{{c.title}}">
<span class="md-title">{{c.title}}</span>
</div>
<md-card-actions layout="row" layout-align="start center">
<md-button>Action 1</md-button>
<md-button>Action 2</md-button>
</md-card-actions>
<md-card-content>
<p>STUFF</p>
<p>STUFF</p>
<md-divider style="padding-bottom:10px;"></md-divider>
<p>STUFF</p>
</md-card-content>
</md-card>
My CSS for the row and the cards within looks like this:
.parent {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.parent .col-md-4, .parent .col-md-4 div, .parent .col-md-4 div > md-card {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
//need these three lines in order to work in IE
flex-grow: 1;
flex-shrink: 0;
flex-basis: auto;
}
The row has the class "parent" and each of the three cards are contained in a col-md-4 class.
I've tried a bunch of different CSS related changes, but nothing seems to work. Can someone provide some guidance on how to make the cards same height, but have the card images and card titles stay in place?