为什么我的页脚没有居中?
有人可以告诉我为什么当你缩小浏览器窗口时我的页脚没有停留在中间吗?
[removed]
Can someone tell me why my footer is not staying in the middle when you make the browser window smaller?
[removed]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
将
min-width:1093px
赋予body
元素Give
min-width:1093px
to thebody
element因为图片太宽了。您应该将红色条变成背景图像。
Because the images are too wide. You should turn the red bars into a background image.
它停留在中间。身体,是它的父母。当窗口大小调整时,正文也会调整大小。您需要一个具有固定宽度的包装器来包含所有集中内容。
It is staying in the middle. Of the body, which is it's parent. When the window resizes, body resizes. You need a wrapper that has a fixed width to contain all your centralized content.
将其放入“fauxcolumns”包装器中,绝对定位到底部,并在“fauxcolumns”底部添加足够的填充,以确保它不会与您的内容发生冲突。
Put it inside your "fauxcolumns" wrapper, absolutely-positioned to the bottom and add enough padding at the bottom of "fauxcolumns" to make sure it doesn't collide with your content.
页脚中的图像有自己的宽度。如果我删除图像并放在
div id="legal" 上,它会保持居中状态
Your images in the footer have their own width. It stays centered for me if I remove the images and put
on the div id="legal"