loading ...
搜狐圈子 IT数码 web2.0 浏览帖子

来自圈子:web2.0 (385 人)

圈子描述:web2.0的讨论区域
圈子标签:web20的世界
web2.0
圈主:徽剑评点
副圈主:
共0页 | 上一页   1   下一页

左右Margin加倍的问题 0/?

标签: cs margin
 当box为float时,IE6中box左右的margin会加倍。比如:
<!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>www.52css.com</title>
<style>
.outer {
width:500px;
height:200px;
background:#000;
}
.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>
 左面的inner的左面margin明显大于5px。
  这时候,定义inner的display属性为inline。
共0页 | 上一页   1   下一页