A quick and easy navigation system (it even looks good)
There are many different ways to incorporate a horizontal nav bar including using Javascript, dropdown menus, text and image links. The following is one example of the most basic horizontal navigation, using text and css. I'll give you a two step approach.
- Create the navigation code
Start by editing the page you want the navigation to appear on. Add a navigation div id followed by links to the pages of your site to which the navigation will point (in the following example, I just made them do nothing). Example:<div id="nav"> <a href="#">home</a> | <a href="#">about</a> | <a href="#">gallery</a> | <a href="#">credits</a> | <a href="#">demographics</a> | </div>
- Add navigation elements to the Stylesheet
Add #nav style information to your stylesheet. Adjust for padding, margin, font, background color, border, and link style. For example,#nav { font-family: Verdana, Arial, sans-serif; font-size: small;; padding:5px; margin:0px; background-color:#71B8D5; color:#fff; border-bottom: 1px solid #6F8C8F; } #nav a { color:#fff; text-decoration:none; } #nav a:hover { text-decoration:underline; }
That's all there is to it!
Here's a working example of navigation created using
steps 1 and 2 given above.