我正在构建一个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;
}
答案 0 :(得分:3)
只需将footer元素的这两个属性添加为容器元素
#footer
{
max-width: 1200px;
min-width: 768px;
}
答案 1 :(得分:0)
在css中删除-60px的边距以解决固定页脚UI设计的问题