How to change the tile "ON" background with CSS

Hope someone can help me here, this stumping me to no end.

All i want to do is change the individual tile background color when in an "ON" state. The off state was obvious and worked as expected.

I will make this simple question, this is a virtual switch in an "ON" state. The yellow around the red is what i can't seem to reference correctly in CSS.

image

This is what I have so far which controls the icon background and color, I want to change the tile background color as well.

I want the CSS way, not the go in the GUI and change the device template.. device templates change all my switches, i want to control the tiles on an individual basis.

I would greatly appreciate a solid answer to this question. Can't happen? Here's the CSS? Limitation? i am sure someone out there has the correct answer for me :slight_smile:

Thanks to those who answer my quest...

1 Like

Appened for question..

#tile-0 .on {
color:blue;
background-color:rgb(255,0,0);

}

How do i change the tile "on' yellow background?

I'd suggest taking a look at this:

2 Likes

Thank you sir for pointing me directly at the answer, I was in several of the guides this past week, including this one and never saw that exact post.

For other in search of... this is the ultimate answer to the above question

#tile-14[style*="background-color"] {
background-color: rgba(255, 0, 0, 1)!important;
}

I can't tell you you how many countless hrs I was coming for this answer :slight_smile:

Thanks again!

3 Likes

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