Post Archive
› January 5, 2004
Non-link element hovering in MSIE
As noted at WASP and also promoted by Anne van Kesteren, Peter Nederlof came up with a JS method of cajoling Win IE into understanding how to hover elements (non-links that is) without cluttering up your XHTML. Then Ben Nolan pointed out that he came up with another solution around the same time, Ben's script is embedded right inside the CSS rather than being a separate file. Here are the links:
- Anne's Post and comments
- Anne's sample page for Peter Nederlof's method
- Original Peter Nederlof documentation
- Ben Nolan's other method
What is all this hubub about? Anytime we can get the most widely used web browser to do the W3 approved tricks that Mozilla, Safari, and other browsers already know by heart, everybody wins. In this case, we win the ability to trigger hover based style changes to any element in a webpage, powerful stuff. Thanks to Anne for the tip.
Cheah Chu Yeow Posted…
Thanks for the linking. I came across this earlier today at WaSP Buzz today and was making a note to implement this myself. Still I long for the day when there is not need for this sort of trickery, as does everyone else I guess.
The sad thing about the hover menu is that it breaks in IE versions earlier than 6. Well actually it still works, but it's ugly. Otherwise it would have been a totally tricked out trick.