2012-09-30 24 views
0

我有一個頁面,具有使用這種方法粘頁腳: http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page動態頁面上置頂頁腳 - IE6發佈

被動態創建通過JavaScript的網頁,所有的瀏覽器都完全符合我的粘頁腳除了工作IE6(不幸的是我必須支持這個愚蠢的瀏覽器)。頁腳到達窗口的底部並停留在那裏(頁面延伸超出窗口大小),所以當您滾動頁腳停留在中心時。

這裏是我的粘頁腳相關的html代碼:

<div class="container"> 
    <div class="header">...</div> 
    <div class="navigation">...</div> 
    <div class="main">...</div> 
    <div class="footer">...</div> 
</div> 

CSS:

html, body { height:100%; } 
.container { min-height:100%; position:relative; } 
.main { padding-bottom:50px; } 
.footer { padding:10px 0; position:absolute; bottom:0; width:100%; background:#ffffff; height:22px; line-height:22px; } 
.ie6 .container { height:100%; zoom:1;} 
+0

爲什麼你支持IE6?該瀏覽器死亡。 – Zaffy

+0

這是不幸的,但大企業仍然懶得升級,所以我不得不支持瀏覽器的這種尷尬 – Reina

回答