I have a button with a rollover using jquery ui to add the class “ui-state-hover” so that the background color/color change on rollover.
Here is the css for the rollover:
.ui-state-hover { border: none; background: #d0e5f5 url(images/ui-bg_glass_75_d0e5f5_1x400.png) 50% 50% repeat-x; font-weight: bold; color:#fff !important; }
I am trying to add seperate css for a rollover on another button which has the class “ui-priority-cart” by adding this css:
.ui-priority-cart .ui-state-hover{color:#00dfff !important;}
however it does not seem to be affecting the color as it still remains white on rollover. Am I missing something?
Your CSS rule should be:
Note the lack of a space, this will apply to an element with both classes
ui-priority-cartandui-state-hover, which I believe is what you’re looking for.The difference is, the CSS you posted would apply to elements with a class of
ui-state-hoverinside an element with a class ofui-priority-cart.