如何在网站底部保留这个div?

Pro*_*ium 0 css

我的网站有一个大问题(基于Joomla和免费模板).当我转到这个页面时:http://bit.ly/2mv4pC 我应该将{p.stickynote}的边距设置为{margin-bottom:300px; }为了解决问题我.

如果你只是尝试使用{margin-bottom:300px; },所以你会看到这样的行为,删除此边距将使此div显示在我的页面的中心.

我已将这些属性{bottom:0px;} {position:fixed;}添加{div style ="bottom:0px;" id ="footer-cover"}但背景"底部的黑色横幅"仍然相同.

是否有任何建议将其固定在网站的底部?

And*_* A. 5

我不认为我完全理解你的问题,但无论如何我都会猜测.我想你希望你的"黑色横幅"位于浏览器查看器的底部,而不是页面本身,就像facebook上的聊天栏一样.

所以要做到这一点,你这样做:

<style>
  #header{}
  #content{margin-bottom:100px} /*to make room for the footer*/
  #footer{height:100px; position:fixed; bottom:0}
</style>

<div id="header" />
<div id="content" />
<div id="footer" />
Run Code Online (Sandbox Code Playgroud)