|
||
| Inside Technique : DHTML Vertical Menus : Styling Menus The menu's appearance is defined using a stylesheet. In the downloadable sample, we
define the style sheet in a linked style sheet names The first CSS rule in this style sheets positions the overall menu (the DIV that contains the menu). In our opening page, we used the CSS float
property to float the content at the left of the screen. Rather than float the menu bar,
you can also absolutely position the menu on the screen by setting the CSS position property to absolute and specifying a top
and left position. In all cases, you must always specify a width for the menu. Without a width, any content to the right of the menu may not be accessible.
Next, you can change the appearance of the menu by modifying the style sheet
applied to the menu's definition tables. The current values within this stylesheet render black menus displayed in a white 9pt Trebuchet MS font. When the user mouses-over the text, the text’s background highlight is a dark blue.
You have now seen how to define and format your vertical menus. We recommend you download the menus.zip file and look at the sample menu. If you are interested in a horizontal menubar, be sure to check out our Menu Toolkit. The Menu Toolkit also includes a simple wizard for building your menu. Page 1:DHTML Vertical Menus © 1997-2000 InsideDHTML.com, LLC. All rights reserved. |