使用Dreamweaver的【目標瀏覽器檢查】功能會提示浮動邊距加倍:如果某條邊與浮動方向同向,則向該邊上的浮動框應用邊距時,邊距會增加一倍。此錯誤隻影響一次或多次浮動的某行中的第一次浮動。影響: Internet Explorer 6.0 目前所知該錯誤隻影響ie6而不影響其他瀏覽器。解決方法:添加display:inline;例子:當box爲float時,IE6中box左右的margin會加倍。
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>[url]www.52css.com[/url]</title>
<style>
.outer {
width:450px;
height:150px;
background:#fc0;
}
.inner {
float:left;
width:200px;
height:100px;
margin:5px;
background:#fff;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner"></div>
<div class="inner"></div>
</div>
</body>
</html>