Automatic resizing card + listgroup

Hi,

How can depending on the item count in the list group the card be resized automatically?

Included is a test project.
TestProject1.zip (51.2 KB)

I have already found an alternative solution by using a WebHTMLDiv and Bootstrap elements but would like also to know if it is possible with Webcore controls.