We would like to know how to horizontal list item with margin.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
ul {<!-- w w w. j a v a2 s.co m-->
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>
The code above is rendered as follows: