Hello,

I have a horizontal list like this with unknown width and want it centered in the box:

<div id="box">
<ul>
<li><a href="/">text1</a></li>
<li><a href="/">text1</a></li>
<li><a href="/">text1</a></li>
<li><a href="/">text1</a></li>
</ul>
<div style="clear:both;"></div>
</div>

#box {
text-align:center;
background-color:#131313;
}
#bottom ul {
margin:0 auto;
list-style:none;
}
#bottom li {
float:left;
}
#bottom a {
margin:0 27px;
text-decoration:none;
}

The problem is, it only gets centered when I give a width to #bottom ul
But the width is unknown, because there can be different strings as link.

Is there any valid solution?

Greetings, Andreas