Homepage Menu DropMenu Homepage
Overview Menu DropMenu Overview F-A-Q Script Goals Known Issues Browser Check
Instructions Menu Step 1 - The Script Step 2 - The Variables Step 3 - Menu Header Step 4 - The Menus Step 5 - Style Sheet
Download Menu Download Dropmenu DropMenu PageMaker
Contact Menu Contact Privacy Statement
Partner Sites Menu WebDevTips andys onestop

Step 3 - Menu Header

To 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.
If you leave the ID="navbar" in the TD tag and use text links, the first menu item appears out of line with the others.
Just follow this rule - text links - ID goes in table
images - ID goes in first TD

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.

previous - next
If you like our script, please rate it!



Valid HTML 4.01! Valid CSS!