2012-02-11 25 views
1

我試圖做一個棘手的頁腳和我的網頁的HTML結構是這樣的:(大大簡化)粘滯的頁腳會在頁面上造成額外的高度?

<head>...</head> 
<body> 
    <div class="centerPane"> 
     <div class="userCenter">..</div> 
     <div class="bottom>...</div> 
    </div> 
</body> 

CSS:

head 
{ 
    height: 100%; 
} 
body 
{ 
    min-height: 100%; 
    height: 100%; 
} 

.userCenter 
{ 
    position:relative; 
    height: 100%; 
} 

.bottom 
{ 
    position: absolute; 
    bottom: 20px; 
    height: 30px; 
} 

出於某種原因,這是推動底部OFF BEYOND在頁面底部,無論firefox 10.0.1上的瀏覽器窗口大小如何。

這裏是一個演示:173.228.119.111:3000/users/sign_in

回答

0

你可以嘗試設置頁腳頁邊距爲負值即:

margin: -4em;