Iefans,靠谱的软件下载站

首页 最新文章 最新安卓 最新苹果 浏览器 IE教程 在线图片编辑 最新软件 最新游戏

当前位置: IEfans / IE专区 / IE动态/ 多种方法解决min-width 不兼容ie6的问题

多种方法解决min-width 不兼容ie6的问题

编辑:秩名2023-06-26 18:00:02

方法一:

复制代码代码如下:
height:auto!important;
height:580px;
min-height:580px;

把以上三行代码加到需要最小宽度的div里即可,原理是使用IE6本身的BUG(当块级元素内部的东西超出此块级元素的高度时,块级元素的高度会被撑开,也就是说IE6中的height属性本身就等同于min-height)。

方法二:

复制代码代码如下:
min-height:200px;
_height:200px;

方法三:

复制代码代码如下:
#min-width{
min-width:900px;
_width:expression((document.documentElement.clientWidth||document.body.clientWidth)900?"900px":"");
line-height:200px;
background:#ccc;
}

方法四:

复制代码代码如下:
#mpage{
width:100%;
min-width:980px;
position:relative;
_width: expression(((document.compatMode document.compatMode=='CSS1Compat')? document.documentElement.clientWidth : document.body.clientWidth) 980? '980px' : 'auto');
}
返回旧版Copyright © 1998-2023 www.iefans.net All Rights Reserved 沪ICP备17019769号-18 意见反馈