<!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=gb2312" />
<title>解决在Firefox中div子元素有浮动时div高度不会自动撑大的问题</title>
</head>
<body>
<h3>效果1:</h3>
<div style="border: 1px solid #000;">
<div style="float:left;200px;">Left</div>
<div style="float:right;200px;">Right</div>
</div>
<br />
<h3>效果2:</h3>
<div style="border: 1px solid #000;overflow: hidden;">
<div style="float:left;200px;">Left</div>
<div style="float:right;200px;">Right</div>
</div>
<p>
注:区别就在于效果2设置了overflow: hidden
</p>
</body>
</html>
图: