为什么用float两列布局做不起来?
<!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">
.mainbody{width:600px;}
.mainbody.left{width:100px;float:left}
.mainbody.right{width:500px;float:left;}
</style>
</head>
<body>
<div class="mainbody">
<div class="left"><img src="file:///C|/Users/Admini/Desktop/wifi.jpg" />
</div>
<div class="right">
<h6>报复社会的少女</h6>
<p>您已经对代码进行了修改,如果要编辑选定对象的属性,请点击刷新或按F5</p>
<span>10分钟之前</span>
</div>
</div>
</body>
</html>
</style>
</head>
<body>
<div class="mainbody">
<div class="left"><img src="file:///C|/Users/Admini/Desktop/wifi.jpg" />
</div>
<div class="right">
<h6>报复社会的少女</h6>
<p>您已经对代码进行了修改,如果要编辑选定对象的属性,请点击刷新或按F5</p>
<span>10分钟之前</span>
</div>
</div>
</body>
</html>