码迷,mamicode.com
首页 > Web开发 > 详细

html css常识

时间:2015-11-16 13:58:01      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:

Firefox,IE8中margin-top的bug及解决办法 

在Firefox,IE8这两个浏览器中,有两个嵌套关系的div,如果外层div的父元素padding值为0,那么内层div的margin-top或者margin-bottom的值会“转移”给外层div。 
a中有b 
在B前面插入一个非空的元素<div style="height:0px">&nbsp;</div>,命名为C。结构为 
<div id="a"> 
<div style="height:0px">&nbsp;</div> 
<div id="b"><!-- content --></div> 
</div> 

html css常识

标签:

原文地址:http://www.cnblogs.com/jlma/p/4968633.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!