Web_Designer
Web_Designer

Reputation: 74530

IE 8 CSS hover over input element issue

My Issue:

The code below works for me in FireFox and Google Chrome, but in IE the button does not change colors. could someone show me how I can fix this issue. Any Suggestions? My input element:

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

The CSS relevant 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;
}

Upvotes: 3

Views: 9281

Answers (1)

cHao
cHao

Reputation: 86506

One thing i've noticed is that if the browser is in quirks mode (ie: if you don't have a doctype line at the top of the page), IE -- even IE8 -- doesn't like :hover on anything but links.

Even <!DOCTYPE html> is enough to trigger standards mode. Add that if it isn't already there.

Upvotes: 10

Related Questions