views:

139

answers:

1

I understand I can set the background color of the value from min to the current slider selection by doing a:

#slider .ui-slider-range { background: #88ac0b; }

How do I set the background color for the entire slider (not just from the min or max to the selected value)

A: 

I haven't looked, but I'd guess that:

#slider {background-color: #f00; /* or whatever colour you want */ }

would work. Assuming that the #slider element is what I think it is.


Edited:

Sorry for taking so long on this, having looked at the jQueryUI's demos (particularly for the color-picker: http://jqueryui.com/demos/slider/#colorpicker) it seems that the background-color property seems to be applied via additional classes applied to the element.

Changing the class from ui-slider-range to ui-slider-range-max seemed promising, but achieved nothing (except from, perhaps, the obvious flipping the coloured area around).

This is weird.

David Thomas
No, that doesn't seem to work. When the page loads, it appears that the color is temporarily applied and I guess something else overwrites it (a css in the jquery ui maybe?)
DotnetDude
Could you link to a live demo so's I can look with Firebug?
David Thomas
@DotnetDude, it might be worth using the above in an inline-style (to start with) just to see if that prevents it being over-ridden. Other than that, use Firebug (or Chrome's developer tools, or Dragonfly...et al) to see from where the style is being assigned/inherited.
David Thomas