百度首页 | 百度空间
 
查看文章
 
解决div内嵌套div的margin-top在firefox中的不理想结果
2007-04-13 15:02

<body style="margin:0;height:0;">
<div id="a0" style="background-color:#333333;height:500px;">
<br style="line-height:0;"/>

//问题存在于--不加入br这一行,在FireFox中a1的margin-top:20px将会在a0上作用,使a0上方与body间有20px的间距,a1与a0的上方没有间距,而IE内正常显示


<div id="a1" style="background-color:#000000;margin-top:20px;height:100px;"></div>
<div id="a2" style="background-color:#000000;margin-top:20px;height:100px;"></div>
</div>
</body>


类别:默认分类 | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码:
 

     

©2008 Baidu