• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Adding Dynamic HTML > Cross-Browser DHTML Example

Cross-Browser DHTML Example

Okay, the $64,000 question is, “Can I possibly create one page that will work in three different browsers—IE, Netscape 4, and Netscape 6?” The answer is “Yes,” because they all have some things in common that may be a little surprising. In this section, we’ll look at the layer-swapping example that was used in Listings 19.9 and 19.11 to see how we can bring them all together in one page.

First, let’s start with Netscape 4. The surprising bit is that you don’t even have to use the <layer> element if you don’t want to! Instead, Netscape 4 will accept the <div> elements and allow you to create the layers using the ID identifiers in a <style> section. That means the cross-browser DHTML example can include the following for all three browsers:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint