Pseudo Class :Hover Does Not Work in IE7

Pseudo class :hover does not work in IE7

IE7 won't allow you to apply :hover pseudo-classes to non-anchor elements unless you explicitly specify a doctype. Just add a doctype declaration to your page and it should work perfectly.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

More on IE7/quirks mode can be found on this blog post.

:hover pseudo-class of CSS does not work in IE7

IE7 supports :hover, at least in standards mode. It may not in quirks mode.

::after on :hover does not work in IE

This seems to be a bug in IE10 (even when it emulates other versions).

I have, though, found a workaround. If you add an empty CSS rule for #d2:hover, it will then listen to #d2:hover::after as shown in this JSFiddle.

:Hover pseudo selector not working on Select element in IE

You can wrap the <select> in a <div> and attach the hover to the div. It's awful, but so is IE.

mouse hover is not working in IE7?

I think IE7 is so old hover doesn't work on anything but a. I remember this used to be a problem in IE.

You can write a workaround that uses an onmouseover/out listener that sets a class.

::after on :hover does not work in IE

This seems to be a bug in IE10 (even when it emulates other versions).

I have, though, found a workaround. If you add an empty CSS rule for #d2:hover, it will then listen to #d2:hover::after as shown in this JSFiddle.



Related Topics



Leave a reply



Submit