Skip to content

How can I make cards all equal height?

Use custom CSS to make cards in a row equal height and control where their text aligns.

Make cards in the same row appear more consistent by stretching each card to the full height of that row. Until dedicated settings are available, add a small CSS snippet to the section’s Custom CSS setting. For setup details, see Shopify documentation on adding custom CSS to your theme

  1. In the theme editor, select the section you want to update. For an overview, see Shopify documentation on the theme editor

  2. Scroll to the bottom of the section settings and open Custom CSS.

  3. Paste the following CSS:

    .card {
    height: 100%;
    }
  4. Save your changes.

By default, card text may be anchored to the bottom of an equal-height card. To place the text directly below the image instead, add this CSS as well:

.card__content {
justify-content: flex-start;
}
  1. Apply CSS per section. Add the code to each section where you want cards to have equal height.
  2. Choose text alignment intentionally. Add the second snippet only when you want card text to start directly below its image.
  3. Save before previewing. Save your changes, then check the section to confirm the card layout looks right.