# Horizontal column centering of repeating groups

**URL:** <https://forum.bubble.io/t/horizontal-column-centering-of-repeating-groups/82525>\
**Category:** Responsiveness\
**Created:** [March 19, 2020, 9:29pm UTC](https://forum.bubble.io/t/horizontal-column-centering-of-repeating-groups/82525 "2020-03-19T21:29:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrismoris](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@chrismoris](https://forum.bubble.io/u/chrismoris)\
**Post date:** [March 19, 2020, 9:29pm UTC](https://forum.bubble.io/t/horizontal-column-centering-of-repeating-groups/82525/1 "2020-03-19T21:29:27Z")

</div>

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

> [@Please make cols center in horz repeating groups](http://forum.bubble.io/t/please-make-cols-center-in-horz-repeating-groups/38358):
>
> I just wanted to post this… i have been griping about the lack of centering RG COLS in horizontal mode.

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

 ![center2](https://us1.discourse-cdn.com/bubble/original/3X/a/a/aafde793a95eac4219dc90d39a42993e8d034add.png)

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

 ![center](https://us1.discourse-cdn.com/bubble/original/3X/5/1/51e7b35cbfe76f71bf61379d6b164c2f6917cdad.png)

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:

> [@Centering repeating group elements](http://forum.bubble.io/t/centering-repeating-group-elements/51683):
>
> The problem is clearly described here: [http://forum.bubble.io/t/please-make-cols-center-in-horz-repeating-groups](http://forum.bubble.io/t/please-make-cols-center-in-horz-repeating-groups) I’ve been struggling with this important missing feature, I’ve seen a lot of posts asking for this, what worked for me is using the Toolbox plugin and running the following code when page is loaded: $( “div.RepeatingGroup \> div.rows” ).css({ “display”: “flex”, “flex-wrap”: “wrap”, “justify-content”: “center” }); This will change justification of all repeating groups on page. I…

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

Thanks!

---

<div class="post-metadata">

**Author:** ![FJP](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FJP](https://forum.bubble.io/u/FJP)\
**Post date:** [March 19, 2020, 10:55pm UTC](https://forum.bubble.io/t/horizontal-column-centering-of-repeating-groups/82525/2 "2020-03-19T22:55:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chrismoris](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@chrismoris](https://forum.bubble.io/u/chrismoris)\
**Post date:** [March 19, 2020, 11:47pm UTC](https://forum.bubble.io/t/horizontal-column-centering-of-repeating-groups/82525/3 "2020-03-19T23:47:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chrismoris](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@chrismoris](https://forum.bubble.io/u/chrismoris)\
**Post date:** [March 20, 2020, 7:20pm UTC](https://forum.bubble.io/t/horizontal-column-centering-of-repeating-groups/82525/4 "2020-03-20T19:20:32Z")

</div>

Anyone know how to do this?

---

<div class="post-metadata">

**Author:** ![sgauchet](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sgauchet/32/76123_2.png) [@sgauchet](https://forum.bubble.io/u/sgauchet)\
**Post date:** [December 2, 2020, 11:33pm UTC](https://forum.bubble.io/t/horizontal-column-centering-of-repeating-groups/82525/5 "2020-12-02T23:33:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jasonturo](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jasonturo/32/149844_2.png) [@jasonturo](https://forum.bubble.io/u/jasonturo)\
**Post date:** [September 9, 2021, 1:47pm UTC](https://forum.bubble.io/t/horizontal-column-centering-of-repeating-groups/82525/6 "2021-09-09T13:47:02Z")

</div>

Hi Chris,

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

Thanks for any help,  
Jason
