2012-10-18 32 views
0

如何讓頁腳位於容器外部的頁面底部?該模板基於樣板。放置容器外的頁腳div

我需要使用什麼CSS來使它坐在底部?

HTML:

</div><!-- end of container --> 

    <div clear="clear"></div> 
      <div id="footer" class="w960"> 
     <div id="footerHolder"> 
      <div class="foot left"></div> 

      <!-- 
      <div class="foot right"> 
       FOLLOW US: 
       <div id="social"> 
        <a href=""><div id="fb" class="socialIcon"></div></a> 
        <a href=""><div id="tw" class="socialIcon"></div></a> 
       </div> 
      </div> 
      --> 
     </div> 
    </div> 

CSS:

#container{width:960px;margin:0px auto 40px auto;} 
#footer{width:100%;clear:both; height:66px;background:#2d2d2f;} 
#footerHolder{width:960px;margin:auto;} 
+0

通過根據需要移動標記?你的問題似乎不夠具體,我想。 –

+0

@MicahHenning標記是在上面的問題,我不能讓CSS坐在底部。 –

+0

你想坐在底部的哪個元素?你想要那個元素固定到頁面還是窗口? –

回答

0

不知道你究竟找什麼,但不應該你#footerHolder包含#footer的? 另外,div clear =「clear」 不是必需的,因爲您在#footer中指定了clear:both屬性。 這應該很好地放在頁面的底部。

+0

我試圖讓頁腳底部而不是一半的內容。我改變了他們,沒有它是正確的 –