Match uk-card height without using UIkit Grid?

Does anyone know how to apply the match match height class to uk-card, or more particularly, uk-card-body when you are not using the Grid stack?

I’ve read this page: UIkit but can’t get it to work.

I can add Joes Match Height stack to the page, select class, and add uk-card-body as the class name, and that works. But given the class uk-match-height exists natively in UIkit, there must be a way to apply independently of the grid stack. I’d have though!

I’ve tried adding uk-height-match="target: uk-card-body" to the outer container, but no dice.

Hi @steveb,

What are you using for the outer container?

The cards were inside a non uikit grid inside a uikit container.

I tested with container plus and the standard uikit3 container
place a standard 2-column stack in it, and two cards (one in each column), and it works.
Put the following in the attributes area of the container or container-plus:

uk-height-match="target: .uk-card-body"

don’t forget the dot before the class name.

Result:

Nailed it. I was missing the dot.

Many thanks.

1 Like