Change color of WProgressbar

Added by Diego Villalpando over 6 years ago

It is possible to change the color of the progresbar depending on its current value?

I have a simple progress bar that goes from 0 - 100, when the value is greater than 75, I want to change its color.



Replies (1)

RE: Change color of WProgressbar - Added by Stefan Arndt over 6 years ago

I guess CSS is your best bet. Change the class from within your code(or js) once you reached a threshold. Afaik you cannot do that with CSS alone.

If only the last part of the bar has to change it's color you may want to look into CSS gradients.