question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

md-card-actions should align at the container's bottom

See original GitHub issue

Playing with Puppy Love Demo, if card-content have different heights and card-container is defined as row:

.card-container {
  display: flex;
  flex-flow: row wrap;
}

then, the md-card-actions are not aligned at the bottom. Looking in the Angular Material Specs, I could not find what is the “right” behavior in this case, but action buttons not aligned at bottom looks pretty wired.

screenshot from 2016-06-09 00-31-11

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:32
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

12reactions
Kydermancommented, Apr 18, 2017

@spookyvale, I just changed the css for md-card to be using display:flex, with a margin-top on the card-actions

.item-card-container {
  display: flex;
  flex-direction: column;
  margin:20px;
}

md-card-actions {
  margin-top:auto;
}
10reactions
EladBezalelcommented, Nov 17, 2017

@willshowell thanks!

This is a quick fix

or you can come close with a simple override:

.mat-card {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.mat-card-content {
  display: flex;
  flex: 1;
}

The problem is how card maintain flex internally… we might need to wrap the inner html of a card with a flex container to handle these situations… (as i did in the stackblitz) @mmalerba thoughts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Directives > mdCard - Angular Material
The <md-card> directive is a container element used within <md-content> containers. An image included as a direct descendant will fill the card's width....
Read more >
How to align content of a div to the bottom - Stack Overflow
This trick works by creating a tall, skinny div, which pushes the text baseline to the bottom of the container. Here is a...
Read more >
Aligning items in a flex container - CSS: Cascading Style Sheets
In this guide, we will take a thorough look at how the alignment and ... and while working in a language written top...
Read more >
Align buttons at bottom of containers - WordPress.org
I would like all 3 of the buttons to be aligned to the bottom of their respective containers. I've tried using the approach...
Read more >
15 ways to implement vertical alignment with CSS
Absolute positioning and margin: auto. An element with no intrinsic size can be centered by simply using equal values from the top and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found