Why not css: active class working in IE7

I have a set of buttons that contain 3 CSS states: default :hover and :active . Both default and :hover states are displayed correctly, but the :active state :active ignored in IE7.

I really don't feel JavaScript errors and would like to avoid this, if at all possible.

+4
source share
3 answers

:hover works in IE 7 :active works in IE 7 when applied to the <a/> element.

See the compatibility list here: http://www.quirksmode.org/css/contents.html

+4
source

IE7.js should do the trick. Just use:

 <!--[if lt IE 7]> <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script> <![endif]--> 

The subset of selectors that it controls:

 parent > child adjacent + sibling adjacent ~ sibling .multiple.classes :hover Now applies to all elements :first-child 

It also captures CSS properties as well as png transparency. It is also lightweight.

+2
source

Do you set classes in a link element? If I remember correctly, IE7 does not recognize states such as freezing and activity in everything that is not a link.

0
source

All Articles