I used CSS for a color change on hover for a table
#tabb tbody tr:hover td{
color:#006;
background:#d0e4f2;
}
This works fine in Chrome and Firefox, but the hover effect does not happen in Internet Explorer 8.
Is there a way to make this effect work with IE8 as well?
That should work fine in IE8.
A stab in the dark:
Make sure you have a doctype as the very first line of your HTML that triggers Standards Mode, such as:
<!DOCTYPE html>
In Quirks Mode, IE emulates version 5.5, which does not support :hover
on elements other than a
.
IE8 is not the usual culprit for :hover
problems. If you can't get it to work, there's always jQuery!
$("#tabb tbody tr").hover(
function() {
$("this").children("td").css( { 'background-color': '#d0e4f2', 'color': '#006' } );
},
function() {
$("this").children("td").css( { ... } );
}
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With