pk wrote:
* the nav buttons do not display in IE6 ( which is what I have on my computer. Not sure why this is happening.
This bit of styling is what's throwing it off.
background:url('butt-circ.gif')0 0 no-repeat;
You need a space between ")" and "0".
pk wrote:
* the nav buttons display on Firefox but the text is not vertically centered.
Actually, the text is centered, but the background is not...
pk wrote:
When you gave it a line-height, does it automatically center the text or do I need additional coding? If so, does the position:relative for the text do the trick?
Since the background image is 40px high, I made the height of the link and the line-height both 40px. I set padding to zero. You have top and bottom padding of 10px, which makes a total height of 60px to be covered by the background image. The background image isn't centered vertically, so its 40px height leaves a 20px background-less gap under the links.
There are different ways to deal with this:
1) Remove the padding, and make sure the height is no more than 40px.
2) Keep the padding, but make sure the height + top padding + bottom padding is equal to or less than 40px.
3) Change the background styling to this:
background:url(butt-circ.gif) no-repeat center center;
In all cases, the height and line-height are equal to each other.
pk wrote:
* I'm trying to learn so why did you change the links to a list?
Two reasons:
1) When I tried styling your original code, it looked fine in IE 7, FF, Opera and Safari, but there was an odd artifact with the rendering in IE 6. The last half of "Contact" was being repeated below the menu, so the text, "tact", was showing up centered below the buttons. I don't know why.
2) When you have a series of links, such as your menu, best practice is to code the "list" of links as an actual list. I didn't want to bother you with this detail here when I initially tried to style your links, but i figured it might solve the unusual rendering problem in IE 6.
There is still the problem with your buttons "wrapping" instead of all being on the same row. Here you have to be careful with the width of #navbar.
I had 100px width + 5px left margin + 5px right margin = 110px
Multiplying that times six, the number of buttons, gives a total width of 660px which worked fine.
Your 10px padding on the left and right requires a new width:
6 x (100+5+5+10+10) = 780px, which won't really center unless you change the width of the body to at least 780px as well.