这个CSS为什么有问题?
我想使用CSS代替表格来工作,但是发现问题多多,行与行之间的空隙总是无法消除,对齐方式也很有问题。请大家帮我看看。代码如下:
<!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>
<style type= "text/css ">
#top10list li h1{font-size:24px;}
#top10list li img{float:left;}
#top10list li h1 a{
color:#000000;
text-decoration:none;
display:block;
float:left;
width:295px;
}
#top10list{padding:0px;margin:0px;list-style-type:none;}
#top10list li{border-top:1px #000000;}
#top10list li.t1{background-color:#FF9900;height:40px;}
#top10list li.t2{background-color:#FF9966;height:40px;}
#top10list li.t3{background-color:#FFCC00;height:40px;}
#top10list li.t4{background-color:#FFCC99;height:40px;}
</style>
</head>
<body>
<ul id= "top10list ">
<li class= "t1 "> <img src= "b1.gif " />
<h1> <a href= "# "> 狗狗未来不是梦 </a> </h1>
<h3> 57 </h3>
</li>
<li class= "t2 "> <img src= "b1.gif " />
<h1> <a href= "# "> 绿豆蛙-我有一个聚宝盆 </a> </h1>
<h3> 57 </h3>
</li>
<li class= "t3 "> <img src= "b1.gif " />
<h1> <a href= "# "> 过大年 </a> </h1>
<h3> 57 </h3>
</li>
<li class= "t4 "> <img src= "b1.gif " />
<h1> <a href= "# "> 小破孩。国宝 </a> </h1>
<h3> 57 </h3>
</li>
<li class= "t4 "> <img src= "b1.gif " />
<h1> <a href= "# "> 猪都笑了(国语版) </a> </h1>
<h3> 57 </h3>
</li>
<li class= "t4 "> <img src= "b1.gif " />
<h1> <a href= "# "> 动画速写14 胖狗拜年 </a> </h1>
<h3> 57 </h3>
</li>
<li class= "t4 "> <img src= "b1.gif " />
<h1> <a href= "# "> 天籁之心 </a> </h1>
<h3> 57 </h3>
</li>
<li class= "t4 "> <img src= "b1.gif " />
<h1> <a href= "# "> 希望(新版) </a> </h1>
<h3> 57 </h3>
</li>
<li class= "t4 "> <img src= "b1.gif " />
<h1> <a href= "# "> 小破孩连连看 </a> </h1>
<h3> 57 </h3>
</li>
<li class= "t4 "> <img src= "b1.gif " />
<h1> <a href= "# "> 狗撵大鸡2006漫漫丸 </a> </h1>
<h3> 57 </h3>