cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Use CSS to change button color by class (ThingWorx 9.0)

nmilleson
17-Peridot

Use CSS to change button color by class (ThingWorx 9.0)

I'm struggling with the CSS to change a button's color dynamically (by passing in different class names to the widget).  I'm able to get this to work:

 

#root_ptcsbutton-7:not([no-wc-style]).widget-content {background: #FF0000; !important}

 

But it's tied to the ID of the button.  I'd like to do it by class instead so it can be more generic.

1 ACCEPTED SOLUTION

Accepted Solutions

Of course I figured it out minutes after I posted... 

 

.myCustomClass .widget-content{background: #FF0000 !important;}

 

seems to do the trick for anyone wondering..

View solution in original post

1 REPLY 1

Of course I figured it out minutes after I posted... 

 

.myCustomClass .widget-content{background: #FF0000 !important;}

 

seems to do the trick for anyone wondering..

Top Tags