我正在构建一个网络应用程序。
我在页面上添加了一个页脚。
页脚在 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;
}
最佳答案
从容器元素开始,只需添加页脚元素的这两个属性
#footer
{
max-width: 1200px;
min-width: 768px;
}
关于html - 页脚在不同的浏览器中采用不同的尺寸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15306974/