CSS – Center Unordered List UL/LI Based Menu

C

Call me stupid, but i’ve always been told that you can’t center the contents of an unordered list as used in the footer menu for many websites (maybe that goes to show that many people don’t know what they’re on about?) the solution just popped into my head – try it for your self!

styles:

#footer{text-align:center;list-style:none}
#footer li{display:inline}

HTML

<ul id=”footer”>
<li><a href=”1.asp”>Link 1</a></li>
<li><a href=”2n.asp”>Link 2</a></li>
<li><a href=”3.asp”>Link 3</a></li>
</ul>

Simple stuff indeed!

About the author

Mark Rushworth

With over 14 years experience in online design and marketing I, like many others, began my professional life as a web designer before realising my talent for digital marketing. This I have pursued as my primary career focus since 2007. Since then Ive worked across all sectors for clients big and small delivering the best bang for your buck.

38 comments

By Mark Rushworth

The SEO Team You Need!

I work as Technical (SEO) Account manager for a UK top 5 Digital Marketing Agency who in turn handle campaigns for some of the UK's largest high street brands. Our approach is to use a broad range of on-page analysis and Link Building techniques to holistically build high quality traffic to your website.

Call me today on 07719181166 for free, honest and open advice about your online projects or email markrush@gmail.com.

Bump

Harron Homes
james betts onclick test

Advertisement