因此,我正在制作一个网站,无论我做什么,我都无法让我的页脚以我想要的方式行事,我希望它在非常底部的页面(不浮动),所以如果有一个页面充满内容不能看到。我尝试了很多东西,并且四处寻找,但找不到我需要的答案,对不起,如果这是重复的。这是我的CSS代码,以及我的HTML结构。我不能让这个页脚留在页面的最底部
这是我的CSS:
footer {
bottom: 0;
height: 10%;
min-height: 75px;
left: 0;
position: absolute;
width: 100%;
text-align: center;
background: #CAA400;
vertical-align: middle;
color: #232323;
}
这是我的HTML(结构):
<head>
</head>
<body>
<div>
lots of random stuff
</div>
<footer id="foot"><p></p></footer>
</body>
我使用position: fixed
,absolute
,relative
,很多东西试过,但我似乎无法到想办法。我认为这可能是一个问题,也许在我的CSS中的父容器,但我不知道,任何额外的输入也将是有益的,谢谢。
谷歌粘页脚 –
可能的复制[你怎么页脚留在底部的网页?](http://stackoverflow.com/questions/42294/how-do-you-get-the-footer-to-stay-at-the-bottom-of-a-web-page) – jmoerdyk
由于您没有在标签中添加Javascript,因此我不会发布我的答案。用JS的小菜一碟。 –