2009-06-07 81 views
3

我試圖讓頁腳留在使用CSS底部 - 粘頁腳:獲取頁腳留在底部

.wrapper { 
    margin: 0 auto; 
    padding: 0 0 0 0; 
    width: 100%; 
    text-align: left; 
    background: #F5F5FF; 
} 

.page .footer { 
    left: 0; 
    width: 100%; 
    min-width: 300px; 
    position: fixed; 
    margin-top: -150px; 
} 

.tfoot { 
    background: #3E5C92; 
    color: #E0E0F6; 
} 

.smallfont { 
    font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; 
} 

而這裏的事物的HTML:

<div class="wrapper">My stuff</div> 
<div class="footer"> 
<div class="tfoot" align="left" style="padding:6px"> 
<div class="smallfont" style="float:right"> 
<a href="?app=about">About Extranet</a>&nbsp;<a href="?app=changelog">Changelog</a>&nbsp;</div> 
<div style="color:white"> 
<small>Copyright &copy; 2009 Radon Systems&nbsp;|&nbsp;Shamil Nunhuck&nbsp;|&nbsp;<?php echo($product.'&nbsp;|&nbsp;'.$version.'&nbsp;|&nbsp;'.$build); ?> 
</div></div></small></div> 

但它並沒有粘在底部。它出什麼問題了?

回答

4

如果你想例如.footer堅持下嘗試以下:

.footer { position:fixed; bottom:0; width:100%; height:110px;} 

當然,我做了寬度和高度,所以改變,因爲你需要。

希望這有助於!

7

嘗試此方法(它我發現的唯一一個持續工作):

http://www.cssstickyfooter.com/

+0

也沒有這樣做:| – bear 2009-06-07 20:38:38

+0

你必須實現它完全如何說它不是一個挑選的東西如果你設計你的外部頁面結構要完全遵循 – jrista 2009-06-07 20:50:03