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;
        }
4

2 回答 2

3

只需将页脚元素的这两个属性添加到容器元素中即可

#footer
{
max-width: 1200px;
min-width: 768px;
}
于 2013-03-09T04:03:25.207 回答
0

在css中去掉-60px的margin来解决固定页脚UI设计的问题

于 2013-03-09T13:05:44.780 回答