外层DIV在Firefox里不会自动伸展高度的解决方法
2011-03-11 16:10
549 查看
IE中div的高度会根据内容来自伸展适应高度。但是FIrefox不会。
解决方法1:
<div>
<div style=”float:left;”>111111111</div>
<div style=”float:right;”>22222222</div>
<div style=”clear:both;”></div>
</div>
方法1应该是最佳的了
解决方法2:
<div style=”overflow:auto;”
>
<div style=”float:left;”>1111111111</div>
<div style=”float:right;”>2222222222</div>
</div>
方法2在IE下有可能现滚动条,是DIV的滚动条,不是浏览器滚动条
解决方法3:
<!–[if !IE]><!–>
<link href=”css/firefox.css” type=”text/css” rel=”stylesheet” />
<!–<![endif]–>
解决方法4:
<div style=”display:table”
>
<div style=”float:left;”>1111111111</div>
<div style=”float:right;”>2222222222</div>
</div>
注意:方法4在FF里有时出现右列下沉的情况,不建议使用
解决方法1:
<div>
<div style=”float:left;”>111111111</div>
<div style=”float:right;”>22222222</div>
<div style=”clear:both;”></div>
</div>
方法1应该是最佳的了
解决方法2:
<div style=”overflow:auto;”
>
<div style=”float:left;”>1111111111</div>
<div style=”float:right;”>2222222222</div>
</div>
方法2在IE下有可能现滚动条,是DIV的滚动条,不是浏览器滚动条
解决方法3:
<!–[if !IE]><!–>
<link href=”css/firefox.css” type=”text/css” rel=”stylesheet” />
<!–<![endif]–>
解决方法4:
<div style=”display:table”
>
<div style=”float:left;”>1111111111</div>
<div style=”float:right;”>2222222222</div>
</div>
注意:方法4在FF里有时出现右列下沉的情况,不建议使用
相关文章推荐
- DIV的高度自动拉伸(height属性)在IE 7和Firefox下无效和解决方法
- 解决在Firefox中div子元素有浮动时div高度不会自动撑大的问题
- DIV的高度自动拉伸(height属性)在IE 7下无效和解决方法
- 转:IE和Firefox的div高度自适应解决方法
- IE和Firefox的div高度自适应解决方法
- DIV的高度自动拉伸(height属性)在IE 7下无效和解决方法
- 解决FireFox及IE8下DIV不会被DIV自动撑大的问题 (兼容)
- firefox中div+css的外层背景色不见的解决方法
- div根据内容自动调节高度的解决方法
- 解决div列高度自动适应的三种最常用的方法
- div根据内容自动调节高度的解决方法
- IE8下DIV嵌套出现外层自适应高度(四种解决方法)
- div根据内容自动调节高度的解决方法
- div里ul li浮动之后父容器高度不能自动增加的解决方法
- Firefox下div层被Flash遮住的解决方法
- Firefox下载文件时“以后自动采用相同的动作处理此类文件”选项不可选的解决方法
- 三种有效解决DIV高度自适应的方法
- 设置DIV根据内容自动调整高度的三个方法
- Android adt v22.6.2 自动创建 appcompat_v7 解决方法,最低版本2.2也不会出现