Different browsers, different needs
Bits and pieces
If you want to use rollovers and you do need to support very old browsers, you can use browser detection to tailor your page to do the right thing. This approach works well with rollovers, because if they aren't supported, you can show a static image without affecting the overall layout of your page.
Figure 6-1: Circular images that use rollovers, if supported by the browser
Figure 6-1 shows a page that uses simple rollovers. When the user moves the mouse over the circular images at the bottom of the page, the shadows are reversed, making it clear that these are active buttons. This script starts by checking for Navigator 3 or later, or IE 4 or later. If the browser meets these criteria, browser is set to "rollover"; otherwise, it is set to "norollover". Example 6-5 demonstrates how browser detection can be wrapped around a single rollover.
Example 6-5: Browser detection for a simple rollover script
Created: December 17, 2001
Revised: December 17, 2001