An alternative solution
You can align the link at the bottom of the card-body
by following these three steps:
- Apply the
d-flex
and flex-column
classes to card-body
- Wrap all the content of
card-body
in a div
.
- Use
flex: 1 1 auto
on this new div
Doing so, the newly created div
always takes all the available space. Hence, the link is always at the bottom of the card-body
.
.flex-grow {
flex: 1 1 auto;
}
Project One
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet numquam aspernatur eum quasi sapiente nesciunt? Voluptatibus sit, repellat sequi itaque deserunt, dolores in, nesciunt, illum tempora ex quae? Nihil, dolorem!
View CodePen
Check this pen on CodePen
FYI, You can make an element occupy all the available space using this method.