怪了,设置float:left和right效果不一样
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml/DTD/xhtml-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,img,ul,li,div,form,input,span,object{margin:0;padding:0;}
#container {width: 920px;margin: 0px auto;}
#leftcon {
float: left;
width: 230px;
border: 1px solid #CCCCCC;
height:300px;
padding-bottom: 15px;
padding-left: 5px;
}
#rightcon {
float:right; <!--设置left正常-->
width:676px;
border: 1px solid #CCCCCC;
height: 100px;
background-color: #CCCCCC;
}
#footer {border-top:1px solid #339999;text-align: center;}
.clearfloat {clear:both;}
-->
</style>
</head>
<body>
<div id="container">
<!--左边内容-->
<div id="leftcon"></div>
<!--右边内容-->
<div id="rightcon" ></div>
<!--网页底部-->
<div id="footer" class="clearfloat"></div>
</div>
</body>
</html>