How to set different size to divs for data from CMS?

Hi everyone!
I have a list of tags that I get from CMS. In design, each block with a tag has a different size.
But when I get tags from CMS all blocks have the same size in spite of that the width = Auto for the Collection wrapper, Collection Item, and div block inside Collection Item.
Have any idea how to set these divs with different width?

Can you please include your read-only link so I can look into how you set this up?

Sure. I have improved result a little — I set Flex/Horizontal for collection item and divs changed their width but now the width of some divs is less than text width.

I recorded a quick video with the few changes needed, but basically you’ll need to adjust the Collection Item Tag element to display: inline-block, remove the min-width and set width: auto


Amazing! Thank you very much for your assistance!