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

Project 2. Creating Toggle-O-Matic Menus > Containing the Menu with <div> Tags

Containing the Menu with <div> Tags

Things still aren’t looking pretty yet. That’s because the navigation hyperlinks are defined to use the descendant selector #divMenu a.menuButton. This means that only anchors with a class of aMenuButton within an element identified as divMenu will be styled the way you’ve defined. Using a descendant selector allows you to give only the buttons inside your navigation layer the fancy styling you’re after. You already have all the anchors using the aMenuButton class; now put them inside a <div>. First you’ll add tags to contain the entire Toggle-O-Matic menu system. In the next section, you’ll add the <div> tags for the submenus.

1.
In Design view, select all three menu button hyperlinks.

2.
In the Layout category of the Insert bar, click the Insert Div Tag icon.

3.
Leave the Class field blank. In the ID drop-down, select divMenu, which is the only available id defined in the CSS file.

Tip

Only unused ids are made available in the ID drop-down list. If you’ve used that id on the page once before, it will be removed from the list to help ensure that your ids are unique to the page.

4.
Make sure Insert is set to Wrap Around Selection, and click OK. Choosing Wrap Around Selection will ensure that all of your hyperlinks are placed inside the newly inserted <div>.

5.
Save your work.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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