Showing posts with label IE6. Show all posts
Showing posts with label IE6. Show all posts

Tuesday, April 20, 2010

IE6中select组件与css中z-index的冲突

Positioned Elements and OS Controls, Applets and Plug-ins这篇文章中,描述了当position为absolute一个DIV被拖到select组件上方的时候,在IE6中,select组件会透过DIV层显示出来,这并不是想要的效果,这个问题并非是一个bug,因为在IE6中,select元素是一个window控制组件,并不支持z-index属性,在IE7之后则开始支持z-index属性,更详细的说明可查看MSDN关于select的文档:
From Microsoft Internet Explorer 5 to Internet Explorer 6, This element is a windowed control and does not support the z-index attribute or zIndex property.
As of Internet Explorer 7, this element is windowless and supports the z-index attribute and the zIndex property. The SELECT element does not require a strict doctype to enable windowless functionality.
This element is an inline element.
This element requires a closing tag.

Tuesday, February 03, 2009

Javascript expression '\s'=='s' is true in ie6

在ie6中
var exp = '\s'=='s';
的结果返回为true.

Tuesday, December 23, 2008

ie中空白渲染的问题

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<form action="test_submit" method="get" accept-charset="utf-8">
<input type="text" name="some_name" value="" id="name">
<div id="x" style="white-space:pre;">x xx x</div>
<div id="y">y yy y</div>
<p><input type="button" value="click here" onclick="document.getElementById('name').value=document.getElementById('x').innerHTML"></p>
<p><input type="button" value="click here" onclick="document.getElementById('name').value=document.getElementById('y').innerHTML"></p>
</form>
</body>
</html>

上面的例子在ie6/ie7中测试时可发现y组成的字符串,其中的空格被ie渲染过后,取到的innerHTML已经变为一个空格了,在firefox/safari上在渲染后看上去是只有一个空格,但innerHTML取到的还是与原码是保持一致的。

Monday, November 03, 2008

When iframe src is too long in IE6/IE7

在ie中,如果页面内的iframe src的URL长度过长(>2083),ie会请求失败。
微软官方文档说明如下:
Microsoft Internet Explorer 具有最大统一资源定位符 (URL) 长度为 2,083 个字符。 Internet Explorer 也有最多 2,048 个字符的最大路径长度。 此限制适用于同时 POST 请求和 GET 请求 URL。
如果要使用 GET 方法,您被限制为最多个最多 2,048 个字符,减去的实际路径中的字符数。
但是,POST 方法不受到用于提交名称 / 值对该 URL 的大小。 这些对被传输在标头而不是在该 URL。
RFC 2616,"超文本传输协议--HTTP / 1.1,"未指定 URL 长度的任何要求。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>when iframe src is too long in IE6/IE7</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
If iframe src url size greater than 2083, ie6/ie7 will failure for this http request.
<iframe src="http://localhost/test.php?x=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></iframe>
</script>
</body>
</html>
Reference:http://support.microsoft.com/kb/208427/zh-cn

Wednesday, August 13, 2008

javascript get style pixel value in ie6 and ie7


var PIXEL = /^\d+(px)?$/i;
function getPixelValue(element, value) {
if (PIXEL.test(value)) return parseInt(value);
var style = element.style.left;
var runtimeStyle = element.runtimeStyle.left;
element.runtimeStyle.left = element.currentStyle.left;
element.style.left = value || 0;
value = element.style.pixelLeft;
element.style.left = style;
element.runtimeStyle.left = runtimeStyle;
return value;
};

Reference: http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291

Tuesday, August 12, 2008

解决IE6的浮动元素的双倍边距问题

对一个div设置了float:left 和 margin-left:100px 那么在IE6中,这个bug就会出现。您只需要多设置一个display即可,代码如下:


div {float:left;margin:40px;display:inline;}

Reference:http://www.javaeye.com/news/3176

Saturday, July 26, 2008

say.no.to.ie.6.js


<script src="http://www.savethedevelopers.org/say.no.to.ie.6.js"></script>

Sunday, February 24, 2008

[CSS Zen Garden] Position fixed property of CSS2 and IE6

Exploiting the fact that Internet Explorer lacks support for fixed positioning and for child selectors, a series of rules were created to deliver the optimal design to browsers that comply with the rules of CSS, and to deliver the alternate design to Internet Explorer:

body#css-zen-garden>div#extraDiv2 {
background-image: url(bg_face.jpg);
background-repeat: no-repeat;
background-position: left bottom;
position: fixed;
left: 0;
bottom: 0;
height: 594px;
width: 205px;
z-index: 2;
}

The following CSS is applied only in browsers that don't understand the previous rule, in this case Internet Explorer. Because the child selectors imply greater specificity, the former rule takes precedence, but only if the browser understands it.
div#extraDiv2 {
background-image: url(bg_face_ie.jpg);
background-repeat: no-repeat;
background-position: left bottom;
position: absolute;
left: 0;
bottom: 0;
height: 600px;
width: 265px;
}

While the fixed-position image scrolls off the page in Internet Explorer 6.0, the design is still attractive and acceptable.

IE7 has supported position fixed property if it’s in standard mode.
reference:
http://www.csszengarden.com/?cssfile=037/037.css

Friday, February 22, 2008

IE6 javascript bug

在IE6中,当一个utf-8的编码文件,包含了一个gbk编码的javascript文件,并有中文注释写在文件头时,此文件后面的javascript有可能不能正常解释,当文件里调用此文件中定义的function时会报function未定义的错误。
在IE7、FIREFOX中无此问题。