css浮动边距加倍错误(双倍边距BUG)的解决办法
作者:不详 来源:source 【大 中 小】 浏览: 添加日期:2007-10-11 我要评论(0)
如果某条边与浮动方向同向,则向该边上的浮动框应用边距时,边距会增加一倍。此错误只影响一次或多次浮动的某行中的第一次浮动。
影响: Internet Explorer 6.0
该错误只影响ie而不影响其他浏览器,我们可以考虑用hack来解决!!!
_display:inline;
加入上面这句问题解决
adobe官方解决方法:
Problem
When a margin is applied to a floated box on the same side as the direction the box is floated AND the floated box is the first one inside its containing box, the margin is doubled. (In other words, a left-floated box with margin-left set to move it away from its containing box will be twice as far away from the left edge of the containing box as intended.)
Solution
Specify display: inline; for the affected float.
Detailed description
This bug only reproduces when the floated element''s margin extends in the same direction as the float itself, and is between the float and the container box''s inside edge. Subsequent floats with similar margins won''t reproduce this bug- just the first float in any row of floated elements.
原文地址:http://www.adobe.com/cfusion/communityengine/index.cfm?event=findByTextId&productid=1&textid=DOUBLED_FLOAT_MARGIN
〖DIV+CSS教程〗Tags: CSS 边距
所属专题:CSS HACK
- 上一篇:纯CSS Lightbox效果
- 下一篇:用br形式清除div层的浮动
相关文章
更多评论(0)..会员评论
推荐文章
热门文章
最新评论文章
推荐专题
在线交流QQ群
- 106310407(开)
- 55427134(开)
- 2993401(开)
- 30235673(开)
- 33424604(开)
- 2993401(开)
- 161512108(开)
- 161510519(开)
- 158375021(开)
- 155858414(开)
- 143309878(开)
- 16373807(开)
- 129098721(开)
- 123473199(开)
- 146991009(开)
- 135792800(开)
