Chapter 15. Fancy Buttons and Menus

Chapter 14 gave you a crash course in JavaScript, the secret ingredient you need to add slick features and frills to ordinary Web pages. Although JavaScript is quirky, arcane, and sometimes frustrating, learning the basics pays off. In this chapter, you’ll see how you can use the JavaScript you learned in Chapter 14 to create fancy buttons and menus that will liven up any Web site.

Although buttons and menus that pulse, swirl, and unfurl may seem like small potatoes, they’re actually a hallmark of contemporary Web design. In fact, a stylized button or well-designed collapsible menu is sometimes all the polish you need to make your site stand out.

Fortunately, you don’t need to be a JavaScript guru to add these sophisticated buttons and menus to your site. As you’ll see in this chapter, there are plenty of great tools (both in Web editing programs like FrontPage and Dreamweaver and in free online scripts) that can help you get the results you want without forcing you to endure an all-night JavaScript coding binge.

Creating Fancy Buttons

In Chapter 8, you learned how to use links to let visitors travel from one page in your Web site to another. Although ordinary links work perfectly well, they just aren’t showy enough for creative Web masters. Instead, modern Web sites usually let surfers move around by clicking graphical buttons, as shown in Figure 15-1.

A graphical button is really just an image (represented by the familiar <img> tag) that’s been ...

Get Creating Web Sites: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.