两个之间有外边距的div模块前面一个float:left后为什么会两个会黏在一起

来源:百度知道 编辑:UC知道 时间:2024/05/07 07:33:00
我的整张页面是760PX第一个div是200.第二个是550 中间有10个像素的外边距,我让他右浮动是好的,可左浮动后就两个DIV就黏在一块了。哪位大侠帮帮忙啊。我快急死了。谢谢啦啊
/*类别管理样式*/
#camanager
{ width:550px;}
/*管理中心栏目样式*/
#m_category
{width:200px;
margin-right:10px;
float:left;
}
#m_category .con p
{ margin:20px 50px;
}
/*可变圆角宽的样式*/
.round2
{
/*border:1px solid #f00;*/
background-image:url("../images/round2_left_top.gif");
background-position:top left;
background-repeat:no-repeat;
} .........

我的页面
<div id="m_category" class="round2">
<h3>管理中心</h3>
<div class="con">
<p><a href="categorymanager.aspx">类别管理</a></p>
<p><a href="newsmanager.aspx">新闻管理</a></p>
<p><a href=

<!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" />
<title>无标题文档</title>
<style type="text/css">
* {
margin:0;
padding:0;
}
#a {
width:200px;
height:100px
background:#000000;
float:left;
}
#b {
width:500px;
height:100px
background:#ccc;
margin:0 10px;
float:left;
}
.clear {
clear:both;
}
</style>
</head>
<body>
<div id="clear&