简体   繁体   English

即使窗口很小,如何使此页脚也停留在页面底部

[英]how to make this footer stay at bottom of page even window is small

I am pretty much stuck in this html problem. 我几乎陷入了这个HTML问题。

I have a page. 我有一页 i want its footer to stay at the bottom and have certian distance to element above it. 我希望其页脚停留在底部,并与上面的元素保持固定距离。 here the Twitter + G+ div. 这是Twitter + G + div。

please see the css inside @media (min-width:481) . 请参阅@media (min-width:481)的CSS。

i tried this: 我尝试了这个:

html, body{
  height: 100%;
}
.fuss{
 position: absolute; 
 bottom: 0;
}

this works for big screens, but if i resize the window to small 15' screen laptop, footer is going over my Twitter and G+ elements. 这适用于大屏幕,但是如果我将窗口的大小调整为15英寸的小屏幕笔记本电脑,则页脚将遍历我的Twitter和G +元素。 why is this? 为什么是这样?

this is the page: http://www.bibago.de/test.html footer works fine in big screens, but in small screens the footer goes over other elements and doesnot stay at bottom. 这是页面: http : //www.bibago.de/test.html页脚在大屏幕上可以正常工作,但是在小屏幕上,页脚可以覆盖其他元素,并且不会停留在底部。

please help. 请帮忙。

thanks. 谢谢。

You don't need to do anything special for the footer to appear at the bottom. 您无需执行任何特殊操作即可使页脚显示在底部。 Simply put it at the end of your page, and as HTML is rendered line by line, it will appear as the last thing (always at the bottom). 只需将其放在页面的末尾,随着HTML逐行呈现,它将显示为最后一件事(始终在底部)。

.fuss{
    margin-top: 50px;   
}

I usually do like this: 我通常这样做:

.fuss {
position: fixed;
bottom: 0;}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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