Menus with Advanced Scripting and DHTML

  • Jon Stephens


In the previous chapter, we looked at some ways in which basic HTML elements such as text and image links can be used to create web menus, and then looked at how we can also make use of form elements plus JavaScript. Now we’ll build on these concepts and techniques to make our menus even more useful, attractive, and responsive to the needs and preferences of our users. In this chapter, we’ll:
  • Start out by offering a basic refresher on what CSS is, and how to use CSS to control the appearance of our menus and other content. We’ll demonstrate the power of CSS and a little scripting, with a couple of examples. One is fairly basic and backwards compatible with the version 4 browsers, while the other is somewhat more involved, and makes use of some basic CSS and HTML Document Object Model (DOM) scripting.

  • Take a look at image maps, and some examples of how they can be used in creating menus, including one with a tabbed interface.

  • Explore the powerful combination of CSS and advanced DOM scripting (DHTML), which can be used to change the content and appearance of pages in real time. We’ll demonstrate some additional ways to make use of this combination to create dynamic menus that are both useful and eye-catching. In all the remaining examples in this chapter, we’ll take those concepts in conjunction with the DOM to produce a number of really cool and useful menu enhancements for web pages, including:

  • Text rollovers and tooltips

  • A floating menu

  • Expanding & collapsing menus


Document Object Model Script File Browser Window Style Property Style Class 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Apress 2002

Authors and Affiliations

  • Jon Stephens

There are no affiliations available

Personalised recommendations