I found a really cool IE behavior that adds the :hover pseudo element to non-anchor
elements. As I'm sure most of you know, while other modern browsers support
hover on all elements, Internet Explorer only does anchors (or hyperlinks).
The hover element (or event really) allows one to use a variety of cool CSS tricks
to do dynamically display content.
For a great resource on using CSS to its full potential go to http://www.alistapart.com/.
In any case, the behavior is downloadable from http://www.xs4all.nl/~peterned/csshover.html.
(1.31 KB).
The behavior uses the fact that while normally IE interprets CSS that it doesn't understand
as UNKNOWN, when it processes the hover pseudo element it parses it correctly but
simply does not act on it. Here is an example of what I mean, LI>A will be
interpreted as UNKNOWN, but LI:Hover will still be interpreted as LI:Hover and simply
ignored. Why does this matter? Well it means that the author did not have
to do his own custom CSS parsing. If you look at the IE
7 project, Dean Edwards makes a separate XMLHTTP call to load the style sheet
and then reads all the styles that IE ignored, and then effectively apply the CSS2
styles to the document.