|
Re: Using a list for navigation, can you center a list?
You can center the list IF you use display:inline etc... if you float then you can "fake" it my left margin on the first nav item.
if you are using display:inline then ul#nav {text-align:center;} You also may want to consider putting the UL in <div id="nav"> vs using ul id="nav"; just an option.
I would bet that in yahoos footer they are using display:inline;
Yahoo is using:
- Code: Select all
<ul id="flist2">
<li class="first"><a href="r/ao">Advertise with Us</a></li>
<li><a href="r/o4">Search Marketing</a></li>
<li><a href="r/pv">Privacy Policy</a></li>
<li><a href="r/ts">Terms of Service</a></li>
<li><a href="r/ad">Suggest a Site</a>[FONT=verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif][/font]</li>
<li><a href="r/ep">Yahoo! Telemundo</a></li
<li><a href="r/1p/*-http://feedback.help.yahoo.com/feedback.php?.src=FP&.from=501&.done=http://www.yahoo.com">Send Feedback</a></li><li class="last"><a href="r/hw">Help</a></li>
</ul>[FONT=verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif]
[/font]
- Code: Select all
#footer li{
display:inline;
Last edited by moojoo; May 9th, 2008 at 16:17.
Reason: Added yahoo code snippets
|