2013-10-15 74 views
0

guys,浮動頁腳prpblem

我正在建立這個響應網站,我有頁腳在底部浮動。

在我index.page(http://testi3.aada.fi/)我的代碼工作正常,但什麼是錯我的內容頁面()即使我使用的浮動頁腳相同的代碼..

有人可以給我一個提示如何解決這個問題?

我的浮碼:

.container { 
min-height: 100%; 
/* equal to footer height */ 
margin-bottom: -120px; 
} 

.container:after { 
content: ""; 
display: block; 
} 

.site-footer, .container:after { 
/* .push must be the same height as footer */ 
height: 120px; 
text-align: center; 

} 

.site-footer { 
background-image: url(../images/footer_bg_trans.png); 
background-repeat: no-repeat; 
background-position: center top; 
text-align: center; 
position: fixed; 
width: 100%; 
bottom: 0; 
} 

/米卡

回答

0

您的內容網頁上的CSS是不一樣的索引頁面上的CSS。對於索引頁.site英尺的CSS是:

.site-footer { 
background-image: url("../images/footer_bg_trans.png"); 
background-position: center top; 
background-repeat: no-repeat; 
bottom: 0; 
position: fixed; 
text-align: center; 
width: 100%; 
} 

凡與內容網頁上的:

.site-footer { 
background-image: url("../images/content_footer_bg.png"); 
background-position: center top; 
background-repeat: no-repeat; 
margin-top: 10px; 
text-align: center; 
} 

你缺少寬度:100%;位置:固定;底部:0;

+0

Thx爲您的答案James.Yes,index.html是可以的。我現在只試圖使「me.html」代碼工作。其他文件仍然有「舊」.site-foote類標籤.. – Mika