CSS / html Centre Problem

Associate
Joined
27 Jan 2005
Posts
830
I'm just starting a site, and I'm stumped.

I've jsut started work on a very, what should be, simple secondary nav bar, but I've got two problems. There will be links in this bar.

1) I need the links to be vertically aligned
2) I need them to be horizantally aligned, but problem with this is that I've got them aligned to the centre kind of, but it's off by about 50px and I have no idea why.
( I know the links don't have the ahref stuff in yet)

HTML:
<div id="secnav">
<ul>
<li>Who We Are</li>
<li>Our Customers</li>
<li>Your Questions</li>
</ul>
</div>

CSS:

#secnav {background-color:#FFCC00; height: 40px}
#secnav ul {text-align: center;}
#secnav li{display:inline; text-decoration: none; margin-left: 20px}

I've used the margin-left to give spacing between the links.
 
That goes over the green primary bar. In size the orange bar needs to be around 40px in size with the text vertically and horizantally in the middle.
 
Yes, many problems fixed! Thank you!

I've uploaded and it works with FF and IE7 - Only little problem now is that I need to space out the links evenly without messing everything else up. I've used padding to space them but they're slighty off?
 
Back
Top Bottom