gpt4 book ai didi

css - 粘性页脚文本问题 - CSS

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

我在使用粘性页脚(留在页面底部的页脚)时遇到了一些麻烦。页脚中的实际文本将 float 到页面底部,但背景不会。我已经查看了一些 HitTest 门的建议问题,但它们与我的问题不符。例如:

Sticky Footer failure

在较小的屏幕上查看时,页脚停留在底部时出现问题。或者另一个用户的 html 标记很奇怪。我相信我遵循了正确的 html,如下所示:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head></head>
<body>
<div id="header_container"></div>
<div class="line_seperator"></div>
<div id="header_text_container"></div>
<div class="line_seperator"></div>
<div id="outside_container"></div>
<div id="footer_container_new"></div>
<script type="text/javascript"></script>
</body>

</html>

我相信我的 css 是正确的,如下所示:

html, body{
height:100%;
}

body {
margin:0px;
padding:0px;
font-size:12px;
font-family: Helvetica, sans-serif;
color:black;
background:url('../images/background3.png') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

#outside_container {
padding-bottom:10px;
min-height: 100%;
margin-bottom:-120px;
}

#footer_container_new {
background: #09C;
min-height: 120px;
width: 100%;
}

但是,我的其中一个表格仍然存在重叠,如下所示:

http://www.verney.ca/pbd2014/registration/index.php

如有任何帮助,我们将不胜感激!

最佳答案

尝试将 clear 添加到页脚容器。

#footer_container_new {
background: #09C;
min-height: 120px;
width: 100%;
clear:both;
}

关于css - 粘性页脚文本问题 - CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23284967/

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