How can I center an unordered list of <li> into a fixed-width div ?

<table width="100%">
    <td width="41%"><img src="/web/20100104192317im_/" width="400" height="424"></td>
    <td width="59%"><p align="left">&nbsp;</p>
      <h1 align="left"></h1>
      <p><br align="left">
        <strong>Marc-André Ménard</strong></p>
        <li>Photographie digitale</li>
        <li>Infographie </li>
        <li>Débug et IT (MAC et PC)</li>
        <li> Retouche </li>
        <li>Site internet</li>
      <p align="left"><span class="style1"><strong>Cellulaire en suisse : </strong></span><a href="#">+41 079 573 48 99</a></p>
      <p align="left"><strong class="style1">Skype : </strong> <a href="#">menardmam</a></p>
    <p align="left"><strong class="style1">Courriel :</strong><a href=""></a></p></td>

Best Answer

To center the ul and also have the li elements centered in it as well , and make the width of the ul change dynamically, use display: inline-block; and wrap it in a centered div.

<style type="text/css">
    .wrapper {
        text-align: center;
    .wrapper ul {
        display: inline-block;
        margin: 0;
        padding: 0;
        /* For IE, the outcast */
        *display: inline;
    .wrapper li {
        float: left;
        padding: 2px 5px;
        border: 1px solid black;

<div class="wrapper">


Here is a jsFiddle link to the code above.