打印

[求助] ie6里产生的问题

复制内容到剪贴板
代码:
<!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 { border:1px solid #FF0000; width:500px; height:300px; float:left; margin:50px;}
#a { width:300px; height:200px; border:1px solid #0000FF; margin-left:5px; float:left; line-height:20px;}
#b { width:200px; height:100px; border:1px solid #000000;margin-left:5px;}
</style>
</head>
<body>
<div id="wrap">
    <div id="a">
        <div id="b"></div>
    </div>
</div>
</body>
</html>
在IE6里  #a 用了个margin-left:5px; 如果在给#a 加上个float:left; margin-left:5px; 就显示的不在是5px...
有啥解决办法么? hack 除外


 提示:您可以先修改部分代码再运行
解决方法display:inline;
建议你在论坛搜索一下“双倍边距”,深入了解。

[ 本帖最后由 hejie06 于 2008-4-15 15:34 编辑 ]
很好..... 非常感谢

TOP