Background color on the enter button = button: freeze status folders in IE

I have an enter button = with a set of background colors, and another one on: hover - see http://jsfiddle.net/hc2Eu/3/

In IE (all versions) - when I click on the button, turn off the button, then the mouse - the background color remains in the setting: hover until you click on it again.

Is there any workaround for this? Preferably not with js? (IE6 not required)

+7
source share
3 answers

The value of <input type="button"> may be fixed - but if there is, I don’t know.

Otherwise, a good option is to replace it with a stylized element a .

Example: http://jsfiddle.net/Uka5v/

 .button { background-color: #E3E1B8; padding: 2px 4px; font: 13px sans-serif; text-decoration: none; border: 1px solid #000; border-color: #aaa #444 #444 #aaa; color: #000 } 

Upsides include that element a will be erased sequentially between different (older) versions of Internet Explorer without any additional work, and I think my link looks better than this button :)

+13
source

Try using the type attribute selector to find the buttons (maybe this will fix too):

 input[type=button] { background-color: #E3E1B8; } input[type=button]:hover { background-color: #46000D } 
+7
source

You need to make sure that the image comes first and insert a comma after calling the background image. then it really works:

  background:url(egg.png) no-repeat 70px 2px #82d4fe; /* Old browsers */ background:url(egg.png) no-repeat 70px 2px, -moz-linear-gradient(top, #82d4fe 0%, #1db2ff 78%) ; /* FF3.6+ */ background:url(egg.png) no-repeat 70px 2px, -webkit-gradient(linear, left top, left bottom, color-stop(0%,#82d4fe), color-stop(78%,#1db2ff)); /* Chrome,Safari4+ */ background:url(egg.png) no-repeat 70px 2px, -webkit-linear-gradient(top, #82d4fe 0%,#1db2ff 78%); /* Chrome10+,Safari5.1+ */ background:url(egg.png) no-repeat 70px 2px, -o-linear-gradient(top, #82d4fe 0%,#1db2ff 78%); /* Opera11.10+ */ background:url(egg.png) no-repeat 70px 2px, -ms-linear-gradient(top, #82d4fe 0%,#1db2ff 78%); /* IE10+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#82d4fe', endColorstr='#1db2ff',GradientType=0 ); /* IE6-9 */ background:url(egg.png) no-repeat 70px 2px, linear-gradient(top, #82d4fe 0%,#1db2ff 78%); /* W3C */ 
+1
source

All Articles