<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
ul {
width: auto;
padding: 10px;
text-align: center;
margin: 0 auto;
background: #ccc;
}
li {
display: inline-block;
margin-right: 15px;
}
</style>
</head>
<body>
<ul>
<li>Test</li>
<li>Test</li>
<li>Test</li>
<li>Test</li>
</ul>
</body>
</html>