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.
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.
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:
Although your site logo already links to your home page, it's still good to have the home page as the top item in your navigation menu. Bear in mind that your site will attract all kinds of visitors, including new Internet users who may not be familiar with the convention that you can click the site logo to go to the main page. Remember that one of your goals in web design is to make it easy for your visitors to get to where they want to go on your website.
You will be creating a site map in the next chapter. I'll also discuss the importance of that page and what it does at that time. For now (or rather, later on in this chapter), just create a button pointing to the site map.
Your site map will be located at "
http://www.example.com/sitemap.html", where "www.example.com" is (of course)
replaced by your actual domain
You will be creating a feedback form in the final chapter of this tutorial. As such, you'll need a button that links to the feedback form.
Your feedback form will be located at "
the "www.example.com" portion replaced by your site's real domain.
If you are creating a business site, you should create an "About Us" page to tell your visitors about your company. For personal sites and hobby sites, this page is optional. (In other words, only add an "About Us" button if you want to have an "About Us" page.)
Your About Us page will have an address of "
with the "www.example.com" replaced accordingly.
If you're selling goods or services, you should create buttons for each of the following:
If you have a physical store, you may also want to create a button that links to a page where you can give your shop's address and provide a map showing visitors how they can get there. Call the button "Location" or "Store locations" or something like that.
The filenames of these pages can be anything you like. However, for the reasons I describe in my article on How to Create Good Filenames for Your Web Pages, do not put spaces or capital (uppercase) letters in your filenames. For example, an address of "http://www.example.com/products.html" is good, but an address of "http://www.example.com/Products.html" may cause problems in the future.
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.
Start up Dreamweaver and open your home page. You can open the page by doubleclicking "
the FILES panel on the right side of the Dreamweaver window.
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
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.
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.
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).
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 "
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.
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".
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.
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.
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.
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.
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.
Hit the DEL button on your keyboard. This shrinks the button down to a thin horizontal gap on your menu.
Position your mouse so that it is directly over that narrow sliver. Click the right mouse button to bring up a pop-up menu.
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...".
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.)
Click somewhere in any one of the buttons on the navigation menu.
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 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.
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.
Click the "OK" button for the CSS Rule Definition dialog box when you're through with your changes.
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.
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.
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.
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.)
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.
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.
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.
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.
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.
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.
You are here:
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 http://www.thesitewizard.com/thesitewizard.xml. You can read more about how to subscribe to RSS site feeds from my RSS FAQ.
This article is copyrighted. Please do not reproduce this article in whole or part, in any form, without obtaining my written permission.
It will appear on your page as: