gpt4 book ai didi

html - 如何使页脚与内容保持一致?

转载 作者:太空宇宙 更新时间:2023-11-04 05:20:54 26 4
gpt4 key购买 nike

On this site,您会看到页脚卡在左侧。这是 CSS:

#footer {
width: 800px;
clear:both;
float:right;
position:relative;
left:-50%;}

请告诉我为什么会这样。

谢谢,

度母

最佳答案

你应该保持简单并使用:

#footer {
width: 800px;
clear: both;
margin: 0 auto; /* center it */
}

例如,这与您在 .container 上成功使用的技术完全相同。

关于html - 如何使页脚与内容保持一致?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6593992/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com