<!DOCTYPE HTML>
<html>
<head>
<title>新闻网站</title>
<link rel="stylesheet" type="text/css" href="comexcss.css" />
</head>
<body>
<div id="banner">
<ul>
<li><a href="www.baidu.com">首页</a></li>
<li>体育</li>
<li>时事热点</li>
<li>焦点新闻</li>
<li>关于</li>
<li>更新</li>
</ul>
</div>
</body>
<html>
<head>
<title>新闻网站</title>
<link rel="stylesheet" type="text/css" href="comexcss.css" />
</head>
<body>
<div id="banner">
<ul>
<li><a href="www.baidu.com">首页</a></li>
<li>体育</li>
<li>时事热点</li>
<li>焦点新闻</li>
<li>关于</li>
<li>更新</li>
</ul>
</div>
</body>
</html>
css中的的内容是:
#banner{
width:100%;
margin:0 auto;
height:30px;
background:#ab0;
}
ul{
list-style:none;
}
li{
float:left;
width:120px;
text-align:center;
border-right:2px solid red;
padding-top:5px;
height:25px;
}
a:link{
text-decoration:none;
}
a:hover {text-decoration: underline; color: blue; }