# Combination of background color for widget & group doesnot work

**URL:** https://discourse.nodered.org/t/combination-of-background-color-for-widget-group-doesnot-work/87054
**Category:** Dashboard
**Created:** [7 April 2024 11:28 UTC](https://discourse.nodered.org/t/combination-of-background-color-for-widget-group-doesnot-work/87054 "2024-04-07T11:28:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)
#### Post date: [7 April 2024 11:28 UTC](https://discourse.nodered.org/t/combination-of-background-color-for-widget-group-doesnot-work/87054/1 "2024-04-07T11:28:19Z")

</div>

I want to have the background for a single group in black and also the templates in this group in green. Therefore i have a template with styles:

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/8/f89008c7333ed9be4de792a101872e2d1a10b40b.png)

Each for itself ist working well, but together the widget templates are black instead of green.

For explanation:  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/5/95cd488e39333b9e0a6331140067bcd577633f70.png)

The template "Wohnzimmer" is now green and the background of the switch and chart should be black (the same colour as the background of the flow).

Any ideas?

Erwin

---

<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: [7 April 2024 14:33 UTC](https://discourse.nodered.org/t/combination-of-background-color-for-widget-group-doesnot-work/87054/2 "2024-04-07T14:33:58Z")

</div>

> [@Nilpferd](#):
>
> background for a single group in black

I suspect you may have set your CSS template as "Widget in group" in the expectation that it will apply only in that group?  
In fact CSS in a "Widget in group" template is applied to every group in that dashboard tab.

Try giving the group a custom class eg "special", then your CSS selector will become something like `.special md-card`

---

<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: [7 May 2024 14:34 UTC](https://discourse.nodered.org/t/combination-of-background-color-for-widget-group-doesnot-work/87054/3 "2024-05-07T14:34:11Z")

</div>

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