大家来帮我看一看啊,为什么我这样写不行???
为什么这样写右浮动的那一块不能在mainbody中顶格?
<!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;}
#wrap{background:#009; margin:0 auto; width:90%}
#header{background:#C00; width:100%}
#mainbody{background:#933; width:100%; overflow:hidden;}
#footer{background:#33C; width:100% clear:both;}
.left{width:75%; height:200px; background:#000; float:left;}
.right{width:20%; height:600px; background:#690; float:right;}
</style>
</head>
<body>
<div id="wrap">
<div id="header">头部</div>
<div id="mainbody">主体部分
<div class="left"></div>
<div class="right"></div>
</div>
<div id="footer">版权部分</div>
</div>
</body>
</html>