2015-02-07 53 views
-1

後略有空間我在刪除頁腳後的空白處有問題。我能夠在Chrome中設置一個 - margin-bottom,但不適用於Firefox或IE。我不太確定我是否理解爲什麼白色空間還在那裏。CSS頁腳

任何幫助表示讚賞。

<div class="footer"> 
    <section class="footer-inner"> 
    <p class="footer-text">Copyright</p> 
    </section> 
</div> 

.footer { 
    height: 300px; 
} 
.footer-inner { 
    margin-top: -10px; 
    background-color: #E0E6E6; 
} 
.footer-text { 
    padding: 100px 0; 
    text-align: center; 
} 

http://jsfiddle.net/trws2062/http://www.johndayers.com/versions/v9/footer_branch/

回答

1

你的頁腳是目前AP類別,這是在頁腳創建底部邊距:

p { 
    margin: 0 0 10px; 
} 

變化從一個段落,一個div頁腳,像所以:

<div class="footer-text"> 
    Copyright &copy; 2015 etc... 
</div> 
+0

哇。謝謝bootstrap。這確實解決了這個問題,並且是這樣的問題,所以我應該如何解決這個問題。 – 2015-02-07 16:45:45

0

由於引導程序將會l在p元素中添加餘量, 設置margin-bottom .footer-text應該可以工作

.footer-text { 
    padding: 100px 0; 
    text-align: center; 
    margin-bottom: 0; 
}