Ali Ali - 2 years ago 126
CSS Question

Hover and Active only when not disabled

I use hover, active and disabled to style Buttons.

But the problem is when the button is disabled the hover and active styles still applies.

How to apply hover and active only on enabled buttons?

Answer Source

You can use :enabled pseudo-class, but notice IE<9 does not support it:

    /*your styles*/
    /*your styles*/
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download