ie6的absolute元素width百分比设置的问题

<div style=”width:700px;height:700px;background:#00CC99″>
<div style=”background:#330066;width:500px;height:500px;”>
<div style=”float:left;background:#FF3366;”>
<div style=”width:300px;height:300px;”></div>
<div style=”width:100%;height:100%;background:red;position:absolute;left:0;top:0;”></div>
</div>
</div>
</div>
在非ie6的浏览器中都是满屏幕的红, 说明非ie6的浏览器的width和height的百分比,都是相对的上个相对定位或者决定定位的元素,没有就为html元素
而,ie6中的width和height 的百分比,相对的是上个有高宽显示设置的元素,而且height的百分比设置失效,所以上述代码在ie6中就出现宽度穿越了他的父元素而遇见width:500px;的元素的时候,边把自己设置成了width:500px;而height的设置则失效,,, 这个, 让人很蛋疼!ie6,真的该早点走了!

Trackback URL

2 Comments on "ie6的absolute元素width百分比设置的问题"

  1. 我是孙大圣
    27/07/2010 at 12:22 上午 Permalink

    看来博主很用心滴维护着个站点哦。换个链接吧。

    孙悟空的花果山(http://blog.sundasheng.net)

    注释:齐天大圣孙悟空的花果山水帘洞,分享我收集的极品资源。

  2. 淘宝网
    09/08/2010 at 12:21 下午 Permalink

    网站文章写的很不错,RSS已经被我订阅了!

Hi Stranger, leave a comment:

ALLOWED XHTML TAGS:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to Comments