IE 8 CSS freezes over element input problem

My number:

The code below works for me in FireFox and Google Chrome, but in IE the button does not change color. can someone show me how i can fix this problem. Any suggestions? My input element:

<input id="pmunch" type="submit" value="Post It!"/>

CSS related to this element:

#pmunch{
width:240px;
height:28px;
padding:2px 4px;
margin-left:24px;
font-family:‘Lucida Console’, Monaco, monospace;
font-size:18px;
border:none;
float:left;
background-color:turquoise;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}
#pmunch:hover{
background-color:khaki;
color:green;
cursor:pointer;
}
+3
source share
1 answer

One thing I noticed is that if the browser is in quirks mode (that is: if you don't have a doctype line at the top of the page), IE - even IE8 - doesn't like it: hover over anything other than links .

Even <!DOCTYPE html>enough to run standard mode. Add this if it does not already exist.

+10
source

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


All Articles