# How to center chips with CSS?

**URL:** <https://community.glideapps.com/t/how-to-center-chips-with-css/53321>\
**Category:** Ask for Help\
**Created:** [November 4, 2022, 3:21pm UTC](https://community.glideapps.com/t/how-to-center-chips-with-css/53321 "2022-11-04T15:21:19Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![KPT](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@KPT](https://community.glideapps.com/u/KPT)\
**Post date:** [November 12, 2022, 3:27pm UTC](https://community.glideapps.com/t/how-to-center-chips-with-css/53321/21 "2022-11-12T15:27:42Z")

</div>

the sequence number is “n” or/and the “1”?

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [November 12, 2022, 3:29pm UTC](https://community.glideapps.com/t/how-to-center-chips-with-css/53321/22 "2022-11-12T15:29:30Z")

</div>

Just change n to yours. 1 is the subtree after n.

---

<div class="post-metadata">

**Author:** ![KPT](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@KPT](https://community.glideapps.com/u/KPT)\
**Post date:** [November 12, 2022, 6:51pm UTC](https://community.glideapps.com/t/how-to-center-chips-with-css/53321/23 "2022-11-12T18:51:06Z")

</div>

> [@Himaladin](#):
>
> ```auto
> div[id*='screenScrollView'] > div > :nth-of-type(n) {
> margin: auto;
> }
> div[id*='screenScrollView'] > div > :nth-of-type(n) div:nth-of-type(1) >div {
> padding: 5px 5px !important;
> }
> 
> ```

Ahh I see what you’re trying to do, but unfortunately nothing changed.

 ![Screenshot 2022-11-12 at 18.49.47](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/2/2294459c057f2d8af12945e19e2cbb9c4d857f97.jpeg)

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [November 12, 2022, 9:02pm UTC](https://community.glideapps.com/t/how-to-center-chips-with-css/53321/24 "2022-11-12T21:02:40Z")

</div>

OMG, I mistook you for understanding. If you want to use CSS, you should have copied the code starting with “pre-span-style” into the rich text component. And just once for all the code below it.

```auto
<pre><span><style> 

div[id*='screenScrollView'] > div > :nth-of-type(n) {
margin: auto;
}

div[id*='screenScrollView'] > div > :nth-of-type(n) div:nth-of-type(1) >div {
padding: 5px 5px !important;
}

```

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [November 13, 2022, 9:02pm UTC](https://community.glideapps.com/t/how-to-center-chips-with-css/53321/25 "2022-11-13T21:02:48Z")

</div>

Closed on November 13, 2022, 9:02pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

[Previous page](https://community.glideapps.com/t/how-to-center-chips-with-css/53321.md?page=1)
