|
![]()
|
Step 3 - Menu HeaderTo make the menu header (or the nav bar) all you have to do is create a simple table layout. This is the header I have used on this site (correct at the time of writing :)
<table cellspacing="0" cellpadding="2" border="0" id="navbar"><tr>
<td width="70"><a href="#1" onmouseover="toggle('menu',1); return false;" class="nav1" title="Home">HomePage</a></td> <td width="70"><a href="#2" onmouseover="toggle('menu2',1); return false;" class="nav1" title="Overview" >Overview</a></td> <td width="90"><a href="#3" onmouseover="toggle('menu3',1); return false;" class="nav1" title="Click to open or close this menu" >Instructions</a></td> <td width="90"><a href="#4" onmouseover="toggle('menu4',1); return false;" class="nav1" title="Click to open or close this menu" >Download</a></td> <td width="70"><a href="#5" onmouseover="toggle('menu5',1); return false;" class="nav1" title="Click to open or close this menu" >Contact</a></td> </tr></table> I have highlighted a couple of things that you need to make sure you include. Let's go through them. id="navbar" This must be placed here - it is the starting reference point from which the menus are relative to. There is an issue with netscape4x if you are using images as menu headers you must reposition id="navbar" from the table element to the the first TD element otherwise the images won't display. width="70" - The widths we use here must correspond to the navwidth array values in vars.js #1 the link we use is just in case javascript is disabled. The menus all have named anchors so this takes us to the menu. onmousever="toggle('menu',1); return false;" This is the wee bit of javascript that calls the function to open the menu we want. That's about all there is to creating the nav bar. |
| |
copyright © Andrew Holt 2000/2006 |