16 April 2007
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.
Beginning
Note: This tutorial was written for Dreamweaver CS3. Although Dreamweaver CS4 adds new CSS functionality (revised Property inspector, Code inspector, related files), the CSS panel in Dreamweaver CS4 has not changed, and you should still be able to follow this tutorial using Dreamweaver CS4.
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.
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.
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:
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.
Here are the steps reviewed in the demo:
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.
Tutorials and samples |
| 04/23/2012 | Resolution/Compatibility/liquid layout |
|---|---|
| 04/20/2012 | using local/testing server with cs5 inserting images look fine in the split screen but do not show |
| 04/18/2012 | Ap Div help |
| 04/23/2012 | Updating |