首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

列表里的A标签的长度如何设置

2012-03-07 
列表里的A标签的长度怎么设置?!DOCTYPEhtmlPUBLIC-//W3C//DTDXHTML1.0Transitional//EN http://www.w3

列表里的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;}

热点排行