简体   繁体   中英

Why is my footer not staying centered?

有人可以告诉我,当您缩小浏览器窗口时,为什么我的页脚不停留在中间吗?

[removed]

Because the images are too wide. You should turn the red bars into a background image.

body元素设置min-width:1093px

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”的底部添加足够的填充,以确保其不会与内容冲突。

Your images in the footer have their own width. It stays centered for me if I remove the images and put

 margin-left: auto;
 margin-right:auto;

on the div id="legal"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM