# CSS command to change the color of sidenav dashboards texts

**URL:** https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205
**Category:** Dashboard
**Tags:** node-red-dashboard
**Created:** [2 January 2024 11:16 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205 "2024-01-02T11:16:26Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Engineer\_M](https://avatars.discourse-cdn.com/v4/letter/e/aeb1de/32.png) [@Engineer\_M](https://discourse.nodered.org/u/Engineer_M)
#### Post date: [2 January 2024 11:16 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/1 "2024-01-02T11:16:26Z")

</div>

hi everyone, sorry is there anyone who knows how to change the color of sidenav dashboards texts

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [2 January 2024 11:33 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/2 "2024-01-02T11:33:08Z")

</div>

What are sidenav dashboards texts?

Edit: only 3 words and yet I transcribed one of them wrong. 🙄

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 January 2024 11:43 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/3 "2024-01-02T11:43:03Z")

</div>

Add a style that targets them in a ui-template set for "head" mode.

---

<div class="post-metadata">

### Author: ![Engineer\_M](https://avatars.discourse-cdn.com/v4/letter/e/aeb1de/32.png) [@Engineer\_M](https://discourse.nodered.org/u/Engineer_M)
#### Post date: [2 January 2024 11:44 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/4 "2024-01-02T11:44:36Z")

</div>

how can i do that

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 January 2024 11:46 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/5 "2024-01-02T11:46:21Z")

</div>

Do what?

- Add a ui-template set for head mode?
- Add a style that targets the text?
- Set CSS that changes text colour?

---

<div class="post-metadata">

### Author: ![Engineer\_M](https://avatars.discourse-cdn.com/v4/letter/e/aeb1de/32.png) [@Engineer\_M](https://discourse.nodered.org/u/Engineer_M)
#### Post date: [2 January 2024 11:52 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/6 "2024-01-02T11:52:22Z")

</div>

i managed to change background color of side menu by using this css code below

body.nr-dashboard-theme md-sidenav {  
color: rgb(255, 255, 255);  
}

but am not able to change texts color of side menu

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 January 2024 11:56 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/7 "2024-01-02T11:56:16Z")

</div>

> [@Engineer\_M](#):
>
> but am not able to change texts color of side menu

then you likely need a more specific specifier.

```css
body.nr-dashboard-theme md-sidenav ul > li > span {
   color: rgb(255, 255, 255);
}

```

**NOTE: I made that specifier ^ up - I dont use dashboard so cant tell you what a more specific specifier might be**

If all else fails, hack it with an `!important` directive

```css
body.nr-dashboard-theme md-sidenav ul > li > span {
   color: rgb(255, 255, 255) !important;
}

```

---

<div class="post-metadata">

### Author: ![Engineer\_M](https://avatars.discourse-cdn.com/v4/letter/e/aeb1de/32.png) [@Engineer\_M](https://discourse.nodered.org/u/Engineer_M)
#### Post date: [2 January 2024 12:00 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/8 "2024-01-02T12:00:20Z")

</div>

what does that codes do?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 January 2024 12:02 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/9 "2024-01-02T12:02:15Z")

</div>

Sorry, what is your question?

You do know what CSS is right?

What are you asking - about which part?

- specificity ?
- the `>` ?
- the `!important` ?
- all of it ?

---

<div class="post-metadata">

### Author: ![Engineer\_M](https://avatars.discourse-cdn.com/v4/letter/e/aeb1de/32.png) [@Engineer\_M](https://discourse.nodered.org/u/Engineer_M)
#### Post date: [2 January 2024 12:09 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/10 "2024-01-02T12:09:02Z")

</div>

I needto change the color of each side menu dashboards texts

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 January 2024 12:12 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/11 "2024-01-02T12:12:30Z")

</div>

Then write CSS with a more specific CSS selector that targets the text items.

Use the browsers devtools to find & determine what the selector looks like.

Then add a CSS class that set the `color`

i gave you an example already BUT since i dont use dashboard I CANNOT tell you what the more specific selector would be - you will need to determine that using the browsers devtools.

example: [web scraping - How can I get the CSS Selector in Chrome? - Stack Overflow](https://stackoverflow.com/questions/4500572/how-can-i-get-the-css-selector-in-chrome)

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [2 January 2024 12:17 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/12 "2024-01-02T12:17:01Z")

</div>

> [@Engineer\_M](#):
>
> i managed to change background color of side menu by using this css code below
> 
> body.nr-dashboard-theme md-sidenav {  
> color: rgb(255, 255, 255);  
> }

I don't believe that CSS changes the background color of the dashboard side menu.

However, referring you back to an answer I gave when you were trying to change the background color (which, like my question above, you didn't bother to respond to)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/801cece0dd7a5bcec837475edfd96a01b05b9c29.jpeg)

I think the relevant bit of the template theme now is Group Text.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 January 2024 12:34 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/13 "2024-01-02T12:34:46Z")

</div>

A quick search of the forum reveals many solutions.

Here are 2:

- [Customizing look of Navigation menu on Dashboard - #5 by jbudd](https://discourse.nodered.org/t/customizing-look-of-navigation-menu-on-dashboard/55523/5)
- [Dashboard CSS tweaks for Side Navigation - #2 by hotNipi](https://discourse.nodered.org/t/dashboard-css-tweaks-for-side-navigation/82915/2)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [1 February 2024 12:35 UTC](https://discourse.nodered.org/t/css-command-to-change-the-color-of-sidenav-dashboards-texts/84205/14 "2024-02-01T12:35:31Z")

</div>

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