How to Customize the Navigation Menu on Your Website with Dreamweaver CS5.5

Chapter 6: Modify, Add Items, Remove Items from Your Navigation Menu Bar


How to Customise the Navigation Menu on Your Website with Dreamweaver CS5.5

by Christopher Heng, thesitewizard.com

If you were to observe the websites that you visit, you will notice that the majority of them sport a set of links that are common to all pages on their site. These links may sometimes look like buttons, and are usually placed either on the left column, the right column, along the top or at the bottom of a website. These links are usually called the navigation menu of a website. You will be customising ("customizing" if you use US English) your navigation menu in this chapter.

I should probably mention that if you have only just arrived at this article from outside thesitewizard.com, this is the 6th chapter of the Dreamweaver CS5.5 tutorial. Since I will assume that you already know what I've taught in the previous chapters, you may want to start with chapter 1 if you're new to Dreamweaver. Those who are complete newcomers to website creation will have an easier time if they start at the very beginning, with the article How to Make / Create Your Own Website: The Beginner's A-Z Guide.

Goal of This Chapter

By the end of this chapter, you will have modified your navigation menu so that they have buttons linking to the other important pages of your site. You will also have, optionally, changed the colours of the buttons so that they fit into the colour scheme of your site.

This chapter also discusses some ways in which you can deal with the unbalanced columns on your web page.

What Do You Put on Your Navigation Menu?

Before we continue, please take a look at the navigation menu in the left column of any page on thesitewizard.com. (If you're reading this chapter using a modern smartphone, you will have to scroll to the bottom of the page to find the navigation menu. I moved the menu there for small screens so that visitors can read the main article more comfortably.) Don't be distracted by the fact that the buttons change colour when your mouse hovers over them. Your menu buttons will work that way too. The thing I actually want to draw your attention to is the types of links I placed in that menu. Notice that the buttons only link to the main sections of thesitewizard.com, as well as to a very few pages that people may want to access from anywhere on the site, like the site map, the home page, and the feedback form. That is, they don't link to every single page on the site.

Since you will be working on your navigation menu (or "navbar" as some people like to call it) from the next section onwards, you will need to decide which pages on your site you want to link to. If your site is going to have hundreds of pages, like mine does, you won't be able to link to everything. (Actually, you can, but your menu will be very long, and your page will be very large and take forever to load.)

Whatever you decide, your navigation menu should at minimum include the following pages:

As you've probably deduced from what I said above, plan both the names you want to put on the buttons, as well as the filenames of the pages linked to. For the Site Map, About Us and Feedback Form pages, please use the filenames I supplied above. You will be using those same filenames in chapters 7 and 8 when you create those pages, so if you change them in this chapter, your buttons will not connect to the pages you create in the next couple of chapters, and you will get 404 File Not Found errors when you click the buttons.

How to Change the Navigation Menu Items into Clickable Buttons

  1. Start up Dreamweaver and open your home page. You can open the page by doubleclicking "index.html" in the FILES panel on the right side of the Dreamweaver window.

  2. This step is almost identical with what you did in chapter 5, where you changed text into clickable links.

    Select the words "Link one" by dragging your mouse over them. Then type "Home" (without the quotes). This should overwrite the existing words with what you type.

    Click the "Link" field in the PROPERTIES panel at the bottom of the Dreamweaver window. Delete the hash ("#") mark that is currently in that field. In its place, type the web address of your home page. For example, type "http://www.example.com/" (without the quotes) into that field, if that is the URL of your home page. Like the link to your home page that you made in chapter 5, you can, alternatively, use a relative URL if you prefer. (Please see chapter 5 to find out what relative and absolute URLs are, if you can't remember what they mean.)

    With this step, the top button in your navigation menu is now a clickable link to your home page.

  3. Select "Link two" (second button) and replace it with "Feedback Form" (without the quotes). Alternatively, you can also use "Contact Form", "Contact Us", "Feedback", "Support" or whatever you want as the label for your feedback form. (It doesn't really matter.) Replace the "#" in the "Link" field of the PROPERTIES panel with either the absolute URL of "http://www.example.com/feedback.html" (without the quotes) or the relative URL of "feedback.html" (without the quotes). If you use an absolute URL, remember to change the "www.example.com" part to your own domain.

  4. Select "Link three" and replace it with "Site Map" (without the quotes). Change the corresponding "#" in the "Link" field of the PROPERTIES panel to either the absolute URL of "http://www.example.com/sitemap.html" (without the quotes, and with the "www.example.com" portion replaced with your domain) or the relative URL or "sitemap.html" (without the quotes).

  5. If you've decided to have an "About Us" page, replace "Link four" with "About Us" (or "About me", or even just "About"). The "Link" field for this button should be set to either "http://www.example.com/about.html" or "about.html". Again, don't enter the quotes, and remember to replace the domain with your own.

    If you don't want an "About Us" page, just skip this step.

At this point, you've either run out of buttons, or have one left over, depending on whether you've created an "About Us" button. Read on to find out how you can add more buttons to your navigation menu, as well as how you can delete buttons that you don't want.

Note that you do not have to put your buttons in the order I suggested above. Apart from the "Home" button, which should always be the first button in your navigation menu, feel free to use any order for the other buttons. Just remember to match the correct page URLs to the labels you place on those buttons. That is, if you replace "Link three" with your About Us page, be sure to use the URL for the About Us page when you modify the Link field in the PROPERTIES panel, and not the Site Map URL.

How to Add a New Button to Your Navigation Menu

  1. Click your mouse somewhere in the last button of your menu. This places the blinking text cursor amidst the words there. Use the arrow keys on your keyboard to move the cursor to the end of the word (or words) on that button. For example, if the last button says "Site Map", make sure that your text cursor is after the "p" of "Map".

  2. Hit the ENTER key (or RETURN key on the Mac). This creates what looks like a tiny sliver of a button below the last button and puts your cursor there.

  3. Type the label you want to put on that button. For example, if you want the next button to say "Order Form", type "Order Form" (without the quotes). Don't worry if the things you type are not properly aligned, or that they don't have the same colour as the other buttons. This will be fixed in the next step.

  4. Select the words you just typed. You may find it easier to select them if you drag your mouse backwards from the last letter of the last word. Alternatively, hold down the Shift key on your keyboard while pressing the arrow keys to select the word.

  5. Type the URL of that page into the Link field of the PROPERTIES panel, followed by the ENTER key. Don't worry that there isn't any hash ("#") mark in that field. For example, type "order.html" into that field (or its absolute URL version, if that's what you used for the other items in your menu).

    The words on the button should now be centred. The button itself will also change colour to match the other buttons on the menu.

If you want even more buttons, just go through the above procedure again for each new button.

How to Delete a Button from Your Navigation Menu

  1. Select all the words on the button that you want to delete. For example, if you want to delete the "Order Form" button on your menu, drag your mouse over the words "Order Form" to select them.

  2. Hit the DEL button on your keyboard. This shrinks the button down to a thin horizontal gap on your menu.

  3. Position your mouse so that it is directly over that narrow sliver. Click the right mouse button to bring up a pop-up menu.

  4. Click the "Remove Tag <li>" item on that menu. The button should disappear altogether.

    Warning: if you do not see "Remove Tag <li>" in the menu, but see something else, like "Remove Tag <ul>", do not click it or you may end up removing all the formatting on your navigation menu, if not the whole menu itself. Instead, hit the ESC key to get rid of the pop-up menu. When you do this, your text cursor will disappear, so you'll have to put it back where it needs to be again, that is, click to place it in that narrow gap that used to be your menu button. Once you see a tiny version of your cursor blinking away in that remnant of a button, right click the gap once more. The right click menu should pop up, allowing you to try this step again.

If you make a mess of things, and find that you've accidentally removed all the formatting from your navigation menu or some other disaster that you don't know how to fix, see if you can undo the mistake by using the "Edit | Undo" menu item. That is, click "Edit" on the menu bar, followed by the "Undo [...etc...]" item in the menu that drops down. (The "Undo" menu item says different things depending on what you just did, but it will always begin with the word "Undo".)

If your mistake is so disastrous that even the Undo button cannot fix, you may also want to consider closing your file without saving anything. That is, click "File | Close" and when Dreamweaver asks you whether you want to save your changes, choose not to save. Then reopen the file again by doubleclicking the "index.html" item in the FILES panel. This will cause you to lose any work you've done since your last save, but at least you'll have got your navigation menu back. Of course if you have saved your file after you made your mistake, then don't do this, since you'll only load back the same error-filled page with the additional problem that you won't be able to use "Edit | Undo...".

How to Change the Colour of Your Navigation Menu Buttons

Now that you know how to modify the buttons on your navigation menu, all that remains is to make sure that the colour of the menu matches that of the rest of your site. You'll probably want to do this if you have modified your site's background colours in chapter 4 to something substantially different from the original.

This entire section is optional. If you like your menu's current colour scheme, just skip to the next section.

There are two sets of colours that you can change on your navigation menu. The first is the normal colour of the button. The second is the colour of the button when your mouse cursor is hovering over it. (No, you cannot test this second colour in Dreamweaver itself, since the latter is not a web browser.)

  1. Click somewhere in any one of the buttons on the navigation menu.

  2. Two lines should appear in the Rules section of the CSS STYLES panel on the right side of Dreamweaver.

    • The line that reads "ul.nav a, ul.nav a:visited <a>" contains the rules for the normal button. Doubleclick this line if you want to change the default colour of the button.

    • The line that reads "ul.nav a:hover, ul.nav... <a>" contains the rules for the menu button when the mouse is hovering over it. Doubleclick this line if you want to change the colour of the button when a mouse cursor is directly over it.

    The two lines look very similar, so look carefully before you click. One line contains the word "a:hover" somewhere, and the other doesn't. The line with the "a:hover" is the one that lets you change the button colour when the mouse is hovering over it. The other one lets you change the default colour.

  3. This should bring up the CSS Rule Definition dialog box that you have encountered over and over again in the previous few chapters. To change the background colour of the button, click the "Background" line in the list box on the left column of the dialog box.

    The right side of the dialog box should change. You should be familiar with this section since you used it in chapter 4 to modify the background colour of the various sections of your web page. The procedure is the same for the navigation menu button, that is, click the box for "Background-colour" to get the colour picker pop-up and select your colour.

  4. Click the "OK" button for the CSS Rule Definition dialog box when you're through with your changes.

Deleting the Placeholder Text in the Left Column

Now that we've finished configuring the menu buttons, it's time to get rid of the placeholder text directly below the menu. I'm, of course, referring to the eyesore that begins with the words "The above links demonstrate a basic navigational..." (etc).

Getting rid of those words should be child's play to you by now. Just click your mouse somewhere in the text and use your Backspace and/or Del key to get rid of them. The bigger problem, as I'm sure you'll realise as soon as you've deleted the junk, is what to do with the unbalanced columns that results. This is the topic of the next section.

How to Fix the Lopsided Columns

Most of you will probably have noticed by now that the left and right columns of your page are somewhat unbalanced. Those of you who have a lot of content in your right column but only a few buttons in your left will see a left column that stops short halfway down the page. Others with a lot of buttons in your navigation menu, but little content in the right column will see a page that appears to be supported by the left column, with the right side of the page a vast expanse of empty space.

There are two ways to deal with this lopsidedness.

  1. Hiding the Unbalanced Columns with Visual Tricks

    One way is to hide the fact that your columns are not equal in length by adjusting the background colours. If you're using a desktop or notebook computer (as opposed to a modern smartphone), you can see this method in action by simply looking at thesitewizard.com's pages, including this very page you're reading. Notice that my left column is actually very short; far shorter than my right. I've tried to reduce the ugliness of this by setting the same background colour for my left and right columns. This gives the illusion that my page is a single column page with a wide left margin where I pasted my navigation menu and other stuff.

    You are of course not restricted to using a white background for this to work. Play around with colours or background images if you like. With a bit of creativity, you can make your page look attractive in spite of having this wide margin.

    For those who have forgotten how to change the background colours, please refer to chapter 4.

  2. Balancing the Columns by Adding Blank Lines to the Shorter Side

    The second way to fix this problem is probably one that has already occurred to you: add blank lines to the column that is shorter. This can be done the usual way: click to place your cursor in the column you want to lengthen, then hit the ENTER (or RETURN) key repeatedly to create blank lines.

    Although this is the obvious solution, it is actually not a very effective solution. Even if you meticulously adjust your page so that both columns are equal in length in Dreamweaver, be aware that your site will appear different on other computers with different monitor sizes (or more accurately, screen resolutions). This is mainly because your web page uses what is known as a "liquid" layout which you selected in chapter 1 when you first created your home page. Such a layout adjusts its width according to how big the browser window is. Since your visitors are unlikely to have the exact same screen size as you do, your site may appear with unbalanced columns on their computers, even if it looks perfect on yours.

    On the other hand, if you disregarded my suggestion to use a liquid layout in chapter 1, and chose a fixed layout instead, it's possible that adding blank lines to the shorter column is a viable solution.

    (Before you rush out to change your site layout to a fixed layout just so you can solve your lopsided columns problem by hitting the ENTER key, be aware that each layout has its own pros and cons. See What's The Difference Between Liquid, Elastic, Relative, Fluid, Flexible and Fixed Layouts? if you want to know more.)

Fine Tune Your Home Page

With this chapter, your home page is complete. As such, if you were holding off making any changes till later, because you thought you still had a long way to go, now is a good time to do those things. That way, you can have the satisfaction of seeing a finished home page when you test your site.

Testing Your Menu

Save your page with "File | Save All" and publish it to your site with "Site | Put".

Go to your site with your web browser and load your home page.

  1. Check Your Colour Scheme

    To check your colour scheme, it's not enough to give your site a cursory visual survey. You should also move your mouse over your navigation menu so that you can see if the hover colour looks good with your the rest of your page.

  2. Check Your Buttons by Clicking Them

    Click the buttons on your navigation menu. The Home button should take you right back to your current page. If it doesn't, go back into Dreamweaver and fix it by entering the correct URL.

    The other buttons should result in "404 File Not Found" errors. This is expected, since you have not actually created those pages yet. If nothing happens when you clicked a particular button, then something is wrong. Either you've left its link pointing to "#", or you've forgotten to make it into a link. Return to Dreamweaver, check the button again and fix it.

  3. Check Your Page Under a Lower Resolution

    It's possible to design your site thinking that everything is fine, only to find out later that it doesn't look good on computers other than your own. This is especially so if you are designing your site on a monitor with a high resolution. This is why you need to check how your page appears in a lower screen resolution as well.

    It's possible to do this without actually buying another computer. All you need is to resize your browser window to a smaller size and check how your site appears in that size. For example, if you know your current monitor has a resolution of 1366x768, and you want to see what your site looks like on a 1024x600 display (used by many netbooks), resize the window so that its new width is about three-quarters the width of your screen (since 1024 divided by 1366 is roughly 0.75, or three quarters). The first number in the resolution is the width of the screen, and the second the height; so, a screen resolution of 1280x800 means a width of 1280 pixels and a height of 800 pixels.

Congratulations. You have now completed your home page.

Next Chapter

In the next chapter, you will learn to use more of Dreamweaver's site management features, including its well-known template system, so that you can create and maintain multiple pages on your website with minimal effort. You will also use that system to create most of the other pages of your website.

Copyright © 2011-2014 Christopher Heng. All rights reserved.
Get more free tips and articles like this, on web design, promotion, revenue and scripting, from https://www.thesitewizard.com/.

You are here:

Top » Getting Started with Your Website »

How to Create / Make Your Own Website: The Beginner's A-Z Guide » List of All Dreamweaver Tutorials »

thesitewizard™ News Feed (RSS Site Feed)  Subscribe to thesitewizard.com newsfeed

Do you find this article useful? You can learn of new articles and scripts that are published on thesitewizard.com by subscribing to the RSS feed. Simply point your RSS feed reader or a browser that supports RSS feeds at https://www.thesitewizard.com/thesitewizard.xml. You can read more about how to subscribe to RSS site feeds from my RSS FAQ.

Please Do Not Reprint This Article

This article is copyrighted. Please do not reproduce or distribute this article in whole or part, in any form.

Related Articles

New Articles

How to Link to This Page

It will appear on your page as:

How to Customise the Navigation Menu on Your Website with Dreamweaver CS5.5





Home
Donate
Contact
Link to Us
Topics
Site Map

Getting Started
Web Design
Search Engines
Revenue Making
Domains
Web Hosting
Blogging
JavaScripts
PHP
Perl / CGI
HTML
CSS
.htaccess / Apache
Newsletters
General
Seasonal
Reviews
FAQs
Wizards

 

 
Free webmasters and programmers resources, scripts and tutorials
 
HowtoHaven.com: Free How-To Guides
 
Site Design Tips at thesitewizard.com
Find this site useful?
Please link to us.