Syndicate content
Jun 29
0

Fixing Internet Explorer 6 and it's broken css :hover selector

Mon, 29/06/2009 - 17:44 — You

For the Arthemia theme I ported to drupal, I ran into a small hurdle - IE6 does not support the css :hover selector and this made the drop downs fail on IE6.

Luckily, I also found a solution: Whatever:hover:

Most modern browsers support the :hover selector for any html element. This is cool, because it enables you to, for instance, apply a mouseover effect to table rows using only CSS. IE however, has an erratic support for :hover at best, depending on the particular version your visitor is using.

Whatever:hover is a small script that automatically patches :hover, :active and :focus for IE6, IE7 and IE8 quirks, letting you use them like you would in any other browser. Version 3 introduces ajax support, meaning that any html that gets inserted into the document via javascript will also trigger :hover, :active and :focus styles in IE.