IE7:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title></title>
</head>
<body>
<div style="600px;height:300px;background-color:Black;float:left;"></div>
<div style="600px;height:300px;background-color:Yellow;float:right;"></div>
<div style="background-color:Green;height:100px;">aa</div><!--在IE7下div并不会被隐藏到浮动元素的下方,说
明浮动元素对于div来说是占位的-->
<table style="background-color:Red;height:10px;10px;"><!--在IE7下浮动元素对table会占位-->
<tr>
<td>
</td>
</tr>
</table>
<span style="clear:both;"><!--在IE7下非块级元素可以清除浮动-->
456
</span>

</body>
</html>
























FireFox/IE8




























另外有几个需要注意的地方:
div的display:inline后会完全消失
在IE和FireFox下:





















