In this fifth section of the Designing with CSS tutorial series, we’ll build a navigation bar in our sample website. To accomplish this, we’ll use an unordered list. Using lists to create site navigation helps keep your pages accessible, as well as making the navigation content easy to update. If you missed any of the previous sections, it may be helpful for you to review them to become familiar with the concepts previously discussed before beginning this part:
In this article, we’ll discuss CSS tips and design considerations. After we complete the navigation bar, we’ll take a look at a minor display issue with the image in the header div that occurs when the page is viewed in Internet Explorer—and we’ll discover how to quickly and easily resolve the issue.
To complete this tutorial you will need to install the following software and files:
This tutorial describes how to create site navigation using Dreamweaver CS3 and assumes you are familiar with working with both Internet Explorer and Firefox browsers. This is Part 5 of a six-part tutorial series—be sure to review Part 4 of this tutorial to review the topics discussed in that section before continuing.
If you haven’t already, download the provided sample files, or open the files we used in Part 4 of this tutorial series. Launch Dreamweaver and open index.html with the Document window in Design view. At the moment, the sidebar1 div holds some default content; this content consists of a heading followed by three links in paragraph text content. First, we’ll remove the paragraph text. You can complete this task by following the steps below:
<p> tag in the Quick Tag Selector at the bottom of the Document window.The paragraph text in the sidebar1 Content is highlighted because it is selected, (see Figure 1).

Figure 1. After selecting the <p> tag in the Quick Tag Selector, the paragraph text is highlighted to indicate it is selected
Repeat the above steps and remove the second paragraph, (see Figure 2).

Figure 2. Delete the two paragraphs of text below the header in the sidebar1 Content div
After you’ve removed the placeholder content in the sidebar1 Content div you are ready to begin building your site navigation.
Here are the steps reviewed in the demo:
<p> tags.<p> tags.Next, we’ll add a little left margin to the li elements, to move the navigation away from the edge of the page and give the design some breathing room.
Here are the steps reviewed in the demo:
Let’s take a moment to review what we just did. We created the basis for our navigation; we’ve added the unordered list and the text that will be used for the links. Next, we’ll change the text into navigation links.
Now that we’ve created a style for the linked text in the navigation bar, we’ll add a hover effect that will interact with the users cursor when they run their mouse over the links.
Here are the steps reviewed in the demo:
In the New CSS Rule dialog box, click to the right of the a element, (see Figure 3).

Figure 3. Create the hover selector for the linked text in the New CSS Rule dialog box
Press F12 to view the index.html page in a browser. Test the navigation buttons by rolling your cursor over the linked text to check the rollover effects, (see Figure 4).

Figure 4. The navigation links use a hover effect to create rollover buttons
The navigation system for the sample site is now complete.
If you’ve been examining the sample project in different browsers, you may have noticed that the image in the header displays a small gap beneath it, (see Figure 5). This gap also appears in Internet Explorer, but does not exist in Firefox. We’ll fix this minor display issue now.

Figure 5. The header image is displayed with a small gap when the page is viewed using Internet Explorer browser.
Here are the steps reviewed in the demo:
Notice that the issue is resolved: The gap under the image has disappeared, (see Figure 6).

Figure 6. View the page in Internet Explorer to check that the gap below the header image has disappeared.
You may have noticed that much of the work we’ve done in this tutorial series has involved the use of descendant selectors. If you plan to use the new CSS Layouts included in Dreamweaver CS3, I recommend becoming as familiar as possible with using descendant selectors. While we’ve seen how well Dreamweaver handles the CSS for you, it is also great to be able to edit the code and modify the style sheet by hand when desired.
After you’ve experimented with the settings described in this tutorial, proceed to Part 6 of this tutorial series. The final article will examine the code you’ve created in the sample site and describe best practices for creating sites that use CSS for site layout and design. Get started by going to, Designing with CSS – Part 6: Using Dreamweaver CS3 compatibility checks for browser compatibility.
Also, if you want to learn more about topics described in this tutorial, see a previous article I wrote, CSS design basics with Dreamweaver – Part 6: Defining and using descendant selectors.
Adrian Senior owns the UK-based web design agency Webade, which has been in business since 1998. He is also a member of Team Macromedia and a partner at Community MX. The year 2004 saw Adrian's first trip to America, where he visited Orlando and delivered two sessions at the TODCon conference.
Adrian also provides training courses for companies who need to train their designers how to build compliant, accessible web sites using CSS and xhtml.
He's been married to his wife, Janette, for 24 years and has two children, Antony and Eleanor.