by Vivienne Trulock
Choose Method: Show Dreamweaver Instructions | Show Code
To make a pretty box style navigation list using CSS we use a simple HTML list and some CSS code.
Make these words into a list: Home, About, Products, Services, Contact
The code for lists look like this.
Add in some links to your list items.

The HTML should look like this when the links have been made.
Using CSS, turn off the list item bullet points.

The CSS code looks like this:
li {
list-style: none;
}
Now style the links adding a font styling, a background colour, width, padding & margins. Most importantly, the links must be styled as 'block' otherwise they will not have any set width, as they are inline elements by default.
Using Dreamweaver,




The CSS code looks like this:
a {
background: #A4B788;
color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
text-decoration: none;
font-size: 80%;
display: block;
width: 10em;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin-top: 0.1em;
padding-left: 0.5em;
}
Lastly, set the list itself to have no left margin. This will set the list to the left of the document, in Internet Explorer 6 & 7.

This is the CSS code.
ul {
margin-left: 0em;
}
Your navigation should now look like this.
See Firefox Hacks for information on making this display correctly in Firefox and other Mozilla browsers.
See Internet Explorer 7 Hacks for information on making this display correctly in Internet Explorer 7.
See Hover Pseudo-Class for information on making the links change on hover.