IE7窗口上的元素消失大小调整

时间:2010-01-12 01:16:18

标签: internet-explorer-7 elements css-position

我正在编写此网页。 http://www.nomizine.com/misc/tbs/default.html

除了IE7之外,它在任何地方都能很好地呈现。当我调整浏览器窗口的大小时,顶部导航,左侧的指南针和右侧的订阅块消失。

知道怎么解决吗?顺便说一下,我已经尝试了像zoom这样的HasLayout技巧:1,清除:两者等但似乎没有任何效果。

2 个答案:

答案 0 :(得分:1)

我认为问题在于罗盘是绝对定位的,但容器(在这种情况下为td)并非绝对或相对定位..

因为绝对定位元素相对于最近的相对或绝对定位父元素定位,所以当尝试重新计算(由于调整大小)放置此元素的位置时,IE7可能会混乱...

我建议你将#compass div包含divposition:relative

<强> [编辑]

好吧,罪魁祸首是css文件中的#header_bg规则。 只需删除位置:相对,所有将恢复正常:)

#header_bg{
   background: url(../images/header_bg.png) no-repeat center top;
   /*position:relative;*/
 }

答案 1 :(得分:0)

这对我有用。

#header_bg{
            background: url(../images/header_bg.png) no-repeat center top;
            height:100%;
            margin:0 auto;
            position:relative;
            text-align:center;
            width:100%;         
    }