# Change color of a single button in a button block

**URL:** <https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871>\
**Category:** Ask for Help\
**Created:** [May 18, 2023, 9:23am UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871 "2023-05-18T09:23:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tempi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tempi/32/59187_2.png) [@Tempi](https://community.glideapps.com/u/Tempi)\
**Post date:** [May 18, 2023, 9:23am UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/1 "2023-05-18T09:23:36Z")

</div>

Hi Gliders

I am new to Glide and to this community chat and hope I am asking the right question in the right place, if not I apologise in advance 😇.

Is state:

1. My Main Navi is Top aligned
2. im using button blocks as sub navi

Issue:

1. can not change Background coor on clicked buttons

Question:

1. is there a way to change the BG colour or icon colour for a clicked single button, that is part of a button block using CSS?
2. Or is possible to give to a single button out of a button block a different color than rest of buttons?

Kind regads to all Gliders

Roberto

 ![button css](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/d/3d276eda1cc61c333f42c29923ef1a6f752aea10.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 18, 2023, 11:18pm UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/2 "2023-05-18T23:18:52Z")

</div>

> [@CSS for Buttons Background](https://community.glideapps.com/t/css-for-buttons-background/61161/2):
>
> div[data-testid\*="test-tiles"] button[aria-label="Primary"].tiles { background-color: gold; } div[data-testid\*="test-tiles"] button[aria-label="Secondary"].tiles { background-color: green; color: white; } div[data-testid\*="test-tiles"] button[aria-label="Go!"].tiles { background-color: magenta; color: white; } The custom CSS class here is “test-tiles”. If you have a sole “open link” action, it should change from “button[aria-label…]” to “a[aria-label…”.

If you have access to use CSS, please try this.

---

<div class="post-metadata">

**Author:** ![Tempi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tempi/32/59187_2.png) [@Tempi](https://community.glideapps.com/u/Tempi)\
**Post date:** [May 19, 2023, 6:00am UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/3 "2023-05-19T06:00:16Z")

</div>

Hi

Thanks a lot for your quick reply.

My buttons are “go to tab” not “open link”. Does it matter?

Regards

Robert

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 19, 2023, 2:01pm UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/4 "2023-05-19T14:01:03Z")

</div>

The example in the link is for anything other than “Open Link”. Please let me know if it works.

---

<div class="post-metadata">

**Author:** ![Tempi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tempi/32/59187_2.png) [@Tempi](https://community.glideapps.com/u/Tempi)\
**Post date:** [May 27, 2023, 2:31pm UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/5 "2023-05-27T14:31:38Z")

</div>

Hi

i tried, somehow i got the link, but i leads to a new page. Is it possible to get the color on the single button as go to tab?

regards

robert

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 27, 2023, 11:32pm UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/6 "2023-05-27T23:32:14Z")

</div>

> [@Tempi](#):
>
> i tried, somehow i got the link, but i leads to a new page. Is it possible to get the color on the single button as go to tab?

Can you show me how you’re configuring that?

---

<div class="post-metadata">

**Author:** ![Tempi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tempi/32/59187_2.png) [@Tempi](https://community.glideapps.com/u/Tempi)\
**Post date:** [May 28, 2023, 9:43am UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/7 "2023-05-28T09:43:00Z")

</div>

Hi

Thank you for your reply and for trying to help me. I am not a programmer and have minimal knowledge. I apologise for not understanding your solution.

here is my setup:

1. im using button blocks as a subnavi
2. buttons triggers “go to tab” function

Every button leads to a tab. This means im using the same button block in every tab.

The scenario in the picture is the administration. The first tab of the administration is visible, the other 4 tabs are not visible (the button block is the only component I could find to get buttons in a row and expand them automatically).

ISSUE:  
Users dont know visually in which tab they are

 ![Screenshot 2023-05-28 112817](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/6/46de33a0bc80aaf2fb59d810df206cfc2bf3896d.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 28, 2023, 10:58am UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/8 "2023-05-28T10:58:30Z")

</div>

> [@Tempi](#):
>
> Users dont know visually in which tab they are

Why do you need this though, isn’t the left-hand-side nav bar sufficient?

---

<div class="post-metadata">

**Author:** ![Tempi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tempi/32/59187_2.png) [@Tempi](https://community.glideapps.com/u/Tempi)\
**Post date:** [May 28, 2023, 11:26am UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/9 "2023-05-28T11:26:58Z")

</div>

i have to many tabs to handle, and i’d like to keep them in main navis. and i would like to keep the top navi view.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 28, 2023, 11:02pm UTC](https://community.glideapps.com/t/change-color-of-a-single-button-in-a-button-block/61871/10 "2023-05-28T23:02:19Z")

</div>

So those tabs you show in the button block are different from the tabs you show in the left-hand-side nav bar?
