刚刚接触到CSS,懂不明白了,margin-bottom和margin-top设置无效,上下边框还是无法分离,
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!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">
#body{text-align:center}
#header{ border:#FF0000 1px solid; height:100px; width:100%;margin-bottom:5px;}
#left{border:#00FF00 1px solid;height:600px; width:18%; float:left}
#center{border:#FFFF00 1px solid;height:600px;width:60%;float:left;margin-left:15px;}
#light{border:#FF0000 1px solid;height:600px;width:18%;float:right}
#fooder{clear:both;border:#ff0000 1px solid;height:100px;width:100%;margin-top:5px}
</style>
</head>
<body>
<div id="header">
</div>
<div id="left">
</div>
<div id="center">
</div>
<div id="light">
</div>
<div id="fooder">
</div>
</body>
</html> 展开
<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">
#body{text-align:center}
#header{ border:#FF0000 1px solid; height:100px; width:100%;margin-bottom:5px;}
#left{border:#00FF00 1px solid;height:600px; width:18%; float:left}
#center{border:#FFFF00 1px solid;height:600px;width:60%;float:left;margin-left:15px;}
#light{border:#FF0000 1px solid;height:600px;width:18%;float:right}
#fooder{clear:both;border:#ff0000 1px solid;height:100px;width:100%;margin-top:5px}
</style>
</head>
<body>
<div id="header">
</div>
<div id="left">
</div>
<div id="center">
</div>
<div id="light">
</div>
<div id="fooder">
</div>
</body>
</html> 展开
7个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询