Search code examples
csscss-selectorspseudo-class

Is it possible to target element by several pseudo-classes via css selector?


I want to set style for disable button hover. I can reach this by targeting for example like:

input[disabled="disabled"]:hover

but what if I want to target disabled only child button input hover? Can I do something like

input[type="button"]:disabled:only-child:hover

???


Solution

  • Yes, you can do it in the way you are asking:

    input[type=button]:disabled:only-child:hover
    

    Works nice: http://jsfiddle.net/TekUR/