Forum Academy Marketplace Showcase Pricing Features

Horizontal column centering of repeating groups

I’ve been trying to center my repeating groups like in this thread:

Does anyone have a solution here? This is what my layout looks like and the response:

When there are less than 3 items, I’d like to center them:

Above you can see that the RG columns are left-indent and not centered.

There is a recommendation to use this snippet of code here:

But I have not been able to get it to work (code in workflow on page load with Toolbox plugin and Javascript).

Thanks!

Maybe a bit cumbersome approach is to duplicate this RG with a fixed number of 2 cold manually centered. When you put each RG in a Group and set a condition that one group is only visible when count of items <= 2 and the other is visible when count > 2 with the option collapse height when hidden is checked, I think you should be able to achieve your goal.

1 Like

Yeah, I thought about this but then you have to do it for combinations 1, 2, 3 and it is just too much code and janky. I’ve seen many threads on this topic and a few solutions I don’t understand, so would like a sustainable solution if anyone has one.

1 Like

Anyone know how to do this?

2 Likes

Hi @chrismoris have you found a (different) solution to this?

Hi Chris,

Did you find a solution to centering horizontal RG’s?

Thanks for any help,
Jason