CSS Submit Styles Button for IE

For Firefox and Chrome, input[type=button]:hover,input[type=submit]:hover and input[type=button],input[type=submit] task will be executed, but what to do with IE (8)?

@Herohtar: They do? Like this? I use this css and they will not work:

  input[type=button],input[type=submit] { border-right-color: black; border-right-style: solid; border-right-width: 1px; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; text-align: center; font-weight: bold; height: 30px; font-family: Georgia,'Times New Roman',times,serif; color: #000000; border-radius: 4px; -moz-border-radius:4px; -webkit-border-radius:4px; background: #fceabb; /* old browsers */ background: -moz-linear-gradient(top, #fceabb 0%, #fccd4d 50%, #f8b500 51%, #fbdf93 100%); /* firefox */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fceabb), color-stop(50%,#fccd4d), color-stop(51%,#f8b500), color-stop(100%,#fbdf93)); /* webkit */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb', endColorstr='#fbdf93',GradientType=0 ); /* ie */ } input[type=button]:hover,input[type=submit]:hover { color: black; border-radius: 6px; -moz-border-radius:6px; -webkit-border-radius:6px; -khtml-border-radius:6px; background: #ffb76b; /* old browsers */ background: -moz-linear-gradient(top, #ffb76b 0%, #ffa73d 50%, #ff7c00 51%, #ff7f04 100%); /* firefox */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffb76b), color-stop(50%,#ffa73d), color-stop(51%,#ff7c00), color-stop(100%,#ff7f04)); /* webkit */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffb76b', endColorstr='#ff7f04',GradientType=0 ); /* ie */ } 
+4
source share
2 answers

input[type=submit] and input[type=button] work both in IE8 and with the condition: hover.

Edit: The CSS you specified there works fine for me in IE8: http://jsfiddle.net/dnZNE/ Perhaps something else in your CSS overrides it?

+7
source

If possible, use jQuery (www.jquery.com):

$(':submit').css( 'attribute', 'value' );

If this is not the case, I am afraid that you should add a class to these buttons.

+1
source

Source: https://habr.com/ru/post/1335715/


All Articles