DW中如何清除两个div+CSS间的距离
代码如下:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xh...
代码如下:
<!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=utf-8" />
<style type="text/css">
<!--
div { margin: 0px; }
#oo { height: 300px; width: 523px; margin-right: auto; margin-left: auto; }
#se { background:#99FF99; height:300px; width:120px; float:left; margin: 0px; }
#main { background:#CC0000; height:300px; width:400px; margin-left:120px; }
-->
</style>
</head>
<html>
<body>
<div id="oo">
<div id="se ">此处显示 id "side" 的内容</div>
<div id="main ">此处显示 id "main" 的内容</div>
</div>
</body>
</html> 展开
<!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=utf-8" />
<style type="text/css">
<!--
div { margin: 0px; }
#oo { height: 300px; width: 523px; margin-right: auto; margin-left: auto; }
#se { background:#99FF99; height:300px; width:120px; float:left; margin: 0px; }
#main { background:#CC0000; height:300px; width:400px; margin-left:120px; }
-->
</style>
</head>
<html>
<body>
<div id="oo">
<div id="se ">此处显示 id "side" 的内容</div>
<div id="main ">此处显示 id "main" 的内容</div>
</div>
</body>
</html> 展开
1个回答
2015-08-22
展开全部
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
*{
margin:0;
padding:0;
}
#oo {
margin: auto;
height: 300px;
width: 520px;
}
#se {
background-color:#99FF99;
height:300px;
width:120px;
float:left;
}
#main {
background-color:#CC0000;
height:300px;
width:400px;
margin-left:120px;
}
</style>
</head>
<html>
<body>
<div id="oo">
<div id="se">
此处显示 id "side" 的内容
</div>
<div id="main">
此处显示 id "main" 的内容
</div>
</div>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询