2013-03-09 87 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