html - How can I prevent hover styles when element is focused -


i've created element, , when hover on it, border color changes original. there color border changes when border focused.
html:

<input id="colorchange" type="text"> 

css:

#colorchange {border: thin solid white;} #colorchange:hover {border: thin solid grey;} #colorchange:focus {border: thin solid black;} 

the problem want border stay black when element focused, if user hovering on it. unfortunately, when hover on element when focused, element becomes gray, though want stay black.
how can this?

try

#colorchange input[type='text']:focus{border: thin solid black;}


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -