Push content to bottom of card

Dan Sherwood

CSS Tutorials Design

Table of Contents

Want to make sure some card content is always at the bottom of their parent cards? Read on to see how.

In this example, we will be looking at how you would ensure these buttons are always pushed to the bottom of the card.

Step-by-step guide

  1. Add d-flex to .card-body

  2. Add flex-column to .card-body

  3. Add mt-auto to the content to be pushed down in .card-body

To see an example of this in action click jsfiddle.net/vopxn9h9/.

This article was based on this stack overflow question found stackoverflow.com/questions/48406628/bootstrap-align-button-to-the-bottom-of-card.

Read more on Bootstrap flex utilities getbootstrap.com/docs/5.0/utilities/flex/.

Read articles directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Copyright © 2006 - 2024 DC Blog - All rights reserved.