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

html导航条
按理说应该我这个class(jichen)应该在id(head_)里排列好的,但是,我发现没排列,而是全部重叠了。求解
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<style type="text/css">
body{margin:0px;
background-image:url(images/body.jpg);
}
#all{
height:1000px;
width:980px;
margin:0px;
margin:auto;
background-color:#CCFF66;
}
#head{
width:980px;
height:56px;
}
#head_a{background-image:url(images/templatemo_menu.png);
width:980px;
height:56px;
}
.tu {
  width:980px;
  height:56px;
}
.xia {
  width:980px;
  height:56px;
  margin:auto;
}
.jichen {
  width:88px;
  height:53px;
  line-height:53px;
  background-color:#CCCCCC;
  float:left;
margin-top:-56px;
  margin-left:1px;
  margin-right:1px;
  text-align:center;
}
</style>
<body>
<div id="all">
<div id="head">
<div id="head_a"></div>

<div class="tu">
<div class="xia">
<div class="jichen">home</div>
<div class="jichen">templates</div>
<div class="jichen">flash files</div>
<div class="jichen">web design</div>
<div class="jichen">web gallery</div>
<div class="jichen">contact us</div>
</div>
</div>
</div>
</div>
</body>
</html>

------解决方案--------------------
.jichen {
width:88px;
height:53px;
line-height:53px;
background-color:#CCCCCC;
float:left;
margin-top:56px;
margin-left:1px;
margin-right:1px;
text-align:center;
}