2013-03-09 88 views
0

我正在構建一個Web應用程序。在不同瀏覽器中採用不同大小的頁腳

我在頁面上添加了頁腳。

Firefox中的頁腳變得更大(水平)。任何可能的原因?

頁腳是一個棘手的DIV這裏提到 - http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

集裝箱CSS -

.container{ 

    background: #ffffff; 
    width: 90%; 
    min-height: 100%; 
      height: auto !important; 
      height: 100%; 

    background: #FFF; 
    margin: 0 auto -60px; 
    max-width: 1200px;/* a max-width may be desirable to keep this layout from getting too wide on a large monitor. This keeps line length more readable. IE6 does not respect this declaration. */ 
    min-width: 768px;/* a min-width may be desirable to keep this layout from getting too narrow. This keeps line length more readable in the side columns. IE6 does not respect this declaration. */ 

} 

頁腳CSS -

#footer { 
     height: 60px; 

     background-color: #F0F0F0 ; 

    width: 90%; 
    margin: 0 auto 0; 

    -moz-border-radius: 2px; 
    border-radius: 2px; 
     } 
+1

頁腳爲90%,與.container一樣,但.container的'max-width:1200px;'頁腳在2nd圖像是> 1200px – Popnoodles 2013-03-09 04:03:27

+0

謝謝!我現在明白了。乾杯! – 2013-03-09 04:05:05

回答

3

只需添加頁腳元素的這兩個屬性作爲容器元件

#footer 
{ 
max-width: 1200px; 
min-width: 768px; 
} 
+0

非常感謝Sachin! – 2013-03-09 04:09:17

+0

@ mad.geek很高興爲您效勞。你可以將它標記爲現在的答案:P :) – Sachin 2013-03-09 04:10:49

+0

是啊。它不允許我接受,直到5分鐘結束。所以等待..歡呼:) – 2013-03-09 04:11:38

0

在CSS中刪除-60px的邊距以解決此問題的固定頁腳UI設計

+0

沒有。 -60px是爲頁腳提供底部空間。它與左/右對齊無關。 – 2013-03-10 00:18:05