发新话题
打印

关于嵌套的子层之间显示距离的问题

关于嵌套的子层之间显示距离的问题

#container {
        margin:0px auto;
        width:600px;
        border: thin solid #F00;
        position:relative;
        height: auto;
}
#top {
        height: 300px;
        background-color: #00F;
}
#middle{
        background-color: #0F0;
}
#foot{
        background-color: #0FF;
}
上面是我写的样式表文件 style.css

<head>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="top">
  <p>此处显示  id "top" 的内容 </p>
  </div>
<div id="middle">
  <p>此处显示  id "middle" 的内容</p>
  </div>
<div id="foot">
  <p>此处显示  id "foot" 的内容</p>
  </div>
</div>
</body>
</html>
这个是使用了样式表的html文件
现在的问题是:显示之后,三个被嵌套层之间的距离如何消除?!
求解答,谢谢!

[ 本帖最后由 xiaqiang120 于 2011-10-2 12:32 编辑 ]
附件: 您所在的用户组无法下载或查看附件
发新话题