Css IE6IE7/IE8 hover problem
I added this bit of code for the input button used by.net for hover, the hover effect works fine on Firefox but does not work in any o the IEs
how can i make it work in IEs
#form-container input.prev_btn{
display: block;
background:none repeat scroll 0 0 transparent;
text-decoration:none;
border:medium none;
color:#5B522F;
font-size:18px;
left:285px;position:relative;
text-transform:uppercase;top:34px;width:400px;
}
#form-container input.prev_btn:hover {开发者_运维问答
background:none repeat scroll 0 0 transparent;
text-decoration:none;
border:medium none;
color:red;
font-size:18px;
left:285px;
position:relative;
text-transform:uppercase;
top:34px;
width:400px;
}
<input type="submit" class="prev_btn" id="btnPreview" value="create e-card" name="btnPreview">
You can test ":hover" at quirks mode: http://www.quirksmode.org/css/hover.html -- it works in IE8 here. Check the browser "mode" it is being run in.
E.g. in "quirks mode", it all goes down-hill: http://www.quirksmode.org/css/quirksmode.html
I'm not doing much HTML programming myself, but I googled a bit, and IE does not support hovering the way you're trying to go it. I found the following webpage: http://www.webmasterworld.com/forum83/6906.htm which appears to give a solution to it. You can google for "HTC file", and "HTC file example" and the first hit on each search seems to give you essentially what you wanted.
I know this is an old one, but the solution to this might simply be to add a DOCTYPE to the HTML page (above the opening HTML tag)
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
精彩评论