Center a unordered UL/LI based menu

I lost count of how many times I broke my head trying to do this…. so taking a note will hurt less for sure: styles: #footer{text-align:center;list-style:none} #footer li{display:inline} HTML <ul id=”footer”> <li><a href=”1.php”>Link 1</a></li> <li><a href=”2n.php”>Link 2</a></li> <li><a href=”3.php”>Link 3</a></li> </ul> Really simple in the end