<html>
<head>
<title>index.html</title>
</head>
<body>
<style type="text/css">
#user{
width:998px;
height:50px;
background-color:red;
}
#navigater {
width:998px;
height:50px;
background-color:blue;
}
#navigater ul{
list-style-type:none;
}
#navigater ul li{
float:left;
}
</style>
<div id="top">
<div id="user">hello,your chinese name</div>
<div id="navigater">
<ul>
<li>home page</li>
<li>I like it</li>
</ul>
</div>
</div>
</body>
</html>
#user和#navigater的边距很大
解决:在#navigater ul{ display:inline;}
或者 *{margin:0px;}