日期:2014-05-17  浏览次数:20828 次

列表里的A标签的长度怎么设置?
<!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=gb2312 "   />    
<title> 无标题文档 </title>    
</head>    
<style   type= "text/css ">    
*{list-style:none;}      
.subnav{border-collapse:collapse;font-family:Tahoma,Verdana;font-size:8pt;cursor:default;}      
.subnav   li{float:left;   width:135px;   background:#d6e8ff;border:solid   1px   #6f9dd9;}      
a{background-color:#eee;}      
   
</style>    
<body>    
<div   class= "subnav ">    
   
<ul>    
<li> <a   href= "# "> 8 <span> Sunday </span> </a> </li>    
<li> <a   href= "# "> 9 <span> Monday </span> </a> </li>    
   
</ul>    
</div>    
</body>    
</html>  

上面A标签的宽度怎么才能设置等于li   的宽度,覆盖背景.


------解决方案--------------------
a {display:block;}