Indeed, but the <ul> seems to take up the maximum space provided by default. It shrinks to the minimum with display:inline; but then won't let the containing div center, for reasons unknown.TheCrow said:would wrapping the menu in a div not be best? then center the div
body {
padding:0;
margin:0;
background-color:#000000;
color:#FFFFFF;
}
#container {
width:760px;
margin:0 auto;
border:1px solid red;
}
#nav {
border:1px solid blue;
}
#nav ul {
list-style-type:none;
padding:0;
margin:0 auto;
border:4px solid green;
display:inline;
}
#nav ul li {
display:inline;
}
#nav ul li a {
}
#nav ul li a:hover {
background-color:#FF0000;
}
#main {
width:760px;
}
#content {
width:396px;
color:#0000FF;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>MuMu</title>
<link href="images/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="nav">
<ul>
<li><a href="#">List one</a></li>
<li><a href="#">List two</a></li>
</ul>
</div>
<div id="content">Content</div>
</div>
</body>
</html>