Insert the menu bar widget, Add or delete menus and submenus – Adobe Dreamweaver CS3 User Manual

Page 461

Advertising
background image

DREAMWEAVER CS3

User Guide

454

Menu Bar widget (consists of <ul>, <li>, and <a> tags)

A. Menu item has submenu B. Submenu item has submenu

The HTML for the Menu Bar widget comprises an outer

ul

tag that contains an

li

tag for each of the top-level menu

items. The top-level menu items (

li

tags) in turn contain

ul

and

li

tags that define submenus for each of the items,

and submenus can likewise contain submenus. Top-level menus and submenus can contain as many submenu items
as you like.

For a more comprehensive explanation of how the Menu Bar widget works, including a full anatomy of the Menu
Bar widget’s code, see

www.adobe.com/go/learn_dw_sprymenubar

.

For a tutorial on creating a Spry Menu Bar, see

www.adobe.com/go/vid0168

.

Insert the Menu Bar widget

1

Select Insert > Spry > Spry Menu Bar.

2

Select Horizontal or Vertical, and click OK.

Note: You can also insert a Menu Bar widget using the Spry category of the Insert bar.
Note: The Spry Menu Bar widget uses DHTML layers to display sections of HTML on top of other sections. If your page
contains Flash content, this might cause a problem because Flash movies are always displayed on top of all other
DHTML layers, so the Flash content might be displayed on top of your submenus. The workaround for this situation is
to change the parameters for the Flash movie to use

wmode="transparent"

. For more information, see

www.adobe.com/go/15523.

Add or delete menus and submenus

Use the Property inspector (Window > Properties) to add or delete menu items to and from the Menu Bar widget.

Add a main menu item

1

Select a Menu Bar widget in the Document window.

2

In the Property inspector, click the plus button above the first column.

3

(Optional) Rename the new menu item by changing the default text in either the Document window or the Text

box of the Property inspector.

Add a submenu item

1

Select a Menu Bar widget in the Document window.

2

In the Property inspector, select the name of the main menu item to which you want to add the submenu.

3

Click the plus button above the second column.

4

(Optional) Rename the new submenu item by changing the default text in either the Document window or the

Text box of the Property inspector.

A

B

September 4, 2007

Advertising