Another Simple Top Navigation Menu

This page features a simple top navigation menu using JavaScript.

In this case, we're going to create a top menu with text links with the backgrounds changeing color when you run your mouse pointer over them.

The font style, size, color and text-decoration are the only features set in the STYLE section and to give us control over the link styles it is a good idea to create a special class for your navigation links. The syntax is simple ...

  • A.topNav:link
  • A.topNav:visited
  • A.topNav:hover

... where "leftNav" is the name of the specific class. You can call it whatever you want. Then, when you create your navigation menu, you include the class name like this:

<A href="http://www.2dwebdesign.com/index.html/" class="topNav">Home</a>

There is also a test for non-JavaScript browsers.


STYLE Specifications

Here's the STYLE block.   Copy it into the HEAD of your page.


The following code includes the links and should be copied into the BODY of your page:

Here's how it displays in your browser.     Naturally, you can change the colors and fonts to suit yourself.

Home Design Build Publish Promote